How to know if a mysql user has all (or some) privileges on a certain DB?

Of course, I don't ask how to do so with phpmyadmin, rather, with the mysql CLI.

I aim to gather as much as basic data on a certain user but the most important for me is to understand the degree this user is associated with the given database (which has the exact same name as the user name, in this case - both the user and the db, are called test).

Edit for PuzzledCuber:

That's my output for show grants for 'test'@'%';:

| Grants for test@localhost                              |
| GRANT USAGE ON *.* TO 'test'@'localhost'               |
| GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'localhost' |

Why is the second row (GRANT ALL...) different than the first row (GRANT USAGE...)?

1 Answer 1


>show grants for 'user'@'%';
Thie explains how to check users and their privileges:

This shows the different permission types and how to grant them:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .