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)-
NameName of roles.
-
UsersList of
user_identitybelonging to this role. -
GlobalPrivsGlobal privilege list.
-
DatabasePrivsList of privileges at the database level.
-
TablePrivsList of privileges at table level.
Example
-
View roles created:
SHOW ROLES;
Keywords
SHOW, ROLES