0

I'm pretty much a newbie with MySQL and WAMP. I just created a new db on localhost, which I called "admin" (original, huh?). On the next page after the creation, the user shows up with 2 lines under "Type", "global" and "database-specific". The former has all privileges, the other one shows a "No" under "Grant". What does that mean?

John Gardeniers
  • 27,262
  • 12
  • 53
  • 108
JDelage
  • 221
  • 1
  • 4
  • 9

2 Answers2

1

Not sure what tool your WAMP stack uses to configure the users in MySQL so I'm making some assumptions but here is how MySQL defines users:

1) A User is created (in the mysql.users table) that allows the user to login to mysql.

2) GRANT statements are applied to that user giving them certain levels of access globally, to specific databases or to specific tables.

What you're seeing is that user is given all permissions globally, and then given specific access to that database but perhaps not the GRANT OPTION permission (which allows them to give others permission).

Here is some more information on GRANT statements in MySQL 5.1: http://dev.mysql.com/doc/refman/5.0/en/grant.html.

Kyle Smith
  • 9,563
  • 1
  • 30
  • 32
1

Put simply, global permissions are those that apply to all the databases on a given MySQL instance. Database specific permissions are those that apply to a specific database only (as suggested by the name).

A user may for example have global select permission, so that queries can be run against all databases, but write permission on only some of the databases.

John Gardeniers
  • 27,262
  • 12
  • 53
  • 108