SHOW GRANTS
Descriptionβ
This statement is used to view user permissions.
Syntax:
SHOW [ALL] GRANTS [FOR user_identity]
Note:
1. SHOW ALL GRANTS can view the privileges of all users.
2. When user_identity is specified, the permissions of the user thus specified will be showed. Meanwhile, this user_identity must be created through CREATE USER command.
3. When user_identity is not specified, the permissions of the current user will be showed.
Examplesβ
-
View all users' permissions.
SHOW ALL GRANTS;
-
View specified users' permissions.
SHOW GRANTS FOR jack@'%';
-
View the current user's permissions.
SHOW GRANTS;