Baidu AI Cloud
中国站

百度智能云

Data Warehouse

SHOW-ROLES

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

  1. View roles created:

    SHOW ROLES;

Keywords

SHOW, ROLES
Previous
SHOW-FILE
Next
SHOW-GRANTS