How do I view the grants (access rights) for a given user in MySQL?
mysql> show grants for 'user'@'host'
If you're already running a web server with PHP then phpMyAdmin is a fairly friendly administrative tool.
You may need to Show Grants Statement
SHOW GRANTS [FOR user]
This statement displays the privileges that are assigned to a MySQL user account, in the form of GRANT statements that must be executed to duplicate the privilege assignments.
To display the privileges granted to the current user (the account you are using to connect to the server), you can use any of the following statements:
SHOW GRANTS;
SHOW GRANTS FOR CURRENT_USER;
SHOW GRANTS FOR CURRENT_USER();
note:
SHOW GRANTS requires the SELECT privilege for the mysql system database, except to display privileges for the current user.\
It's directly from the official website
You could try this:
SELECT GRANTEE, PRIVILEGE_TYPE FROM information_schema.user_privileges;
SELECT User,Host,Db FROM mysql.db;
An alternative method for recent versions of MySQL is:
select * from information_schema.user_privileges where grantee like "'user'%";
The possible advantage with this format is the increased flexibility to check "user's" grants from any host (assuming consistent user names) or to check for specific privileges with additional conditions (eg, privilege_type = 'delete').
This version is probably better suited to use within a script while the "show grants" syntax is better for interactive sessions (more "human readable").
You might want to check out mk-show-grants from Maatkit, which will output the current set of grants for all users in a canonical form, making version control or replication more straightforward.