How do I view the grants (access rights) for a given user in MySQL?
Mysql – View grants in MySQL
mysql
Related Question
- Mysql – concatenate multiple MySQL rows into one field
- Mysql – Which MySQL data type to use for storing boolean values
- Mysql – Should I use the datetime or timestamp data type in MySQL
- Mysql – How to view live MySQL queries
- Mysql – How to specify unique constraint for multiple columns in MySQL
- Mysql – How to get a list of user accounts using the command line in MySQL
- Mysql – Create new user in MySQL and give it full access to one database
- Mysql – How to get the sizes of the tables of a MySQL database
Best Solution
An alternative method for recent versions of MySQL is:
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").