This is an old revision of the document!
GRANT (privileges)
Show Grants
- see SHOW
Grants
Adding a New User
- Global Privileges (all databases and tables):
GRANT ALL PRIVILEGES ON *.* TO username@localhost IDENTIFIED BY 'password';
- Global Privileges for “acme” database (and all acme tables):
GRANT ALL PRIVILEGES ON acme.* TO username@localhost IDENTIFIED BY 'password';
- see also: authentication_problems
Removing a User
- revoke removes a user from all privilege tables, but not the user table; you must use one of the following:
Flushing Privileges
You need to flush privileges after manually making changes to user tables.
FLUSH PRIVILEGES;