SHOW GRANTS
Description
This statement is used to view user rights.
Grammar: SHOW [ALL] GRANTS [FOR user_identity];
Explain:
- SHOW ALL GRANTS can view the privileges of all users.
- If you specify user_identity, view the permissions of the specified user. And the user_identity must be created for the CREATE USER command.
- If you do not specify user_identity, view the permissions of the current user.
example
- View all user rights information
SHOW ALL GRANTS;
- View the permissions of the specified user
SHOW GRANTS FOR jack@’%’;
- View the permissions of the current user
SHOW GRANTS;
keyword
SHOW, GRANTS