SHOW-ROLES
Last Updated:2021-04-13
SHOW ROLES
Description
This statement is used to show all created role information, including name of roles, users and privileges contained.
SHOW ROLES;
Description of return results:
mysql> show roles;
+----------+-------------+-----------------------+---------------+------------+
| Name | Users | GlobalPrivs | DatabasePrivs | TablePrivs |
+----------+-------------+-----------------------+---------------+------------+
| admin | 'admin'@'%' | Admin_priv | N/A | N/A |
+----------+-------------+-----------------------+---------------+------------+
2 rows in set (0.00 sec)
-
Name
Name of roles.
-
Users
List of
user_identity
belonging to this role. -
GlobalPrivs
Global privilege list.
-
DatabasePrivs
List of privileges at the database level.
-
TablePrivs
List of privileges at table level.
Example
-
View roles created:
SHOW ROLES;
Keywords
SHOW, ROLES