SHOW ROLES

May 28, 2026 ยท View on GitHub

import UserManagementPriv from '../../../_assets/commonMarkdown/userManagementPriv.mdx'

SHOW ROLES displays all roles in the system. You can use SHOW GRANTS FOR ROLE <role_name>; to view the privileges of a specific role. For more information, see SHOW GRANTS.

This command is supported from v3.0.

Syntax

SHOW ROLES

Return fields:

FieldDescription
NameThe name of the role.

Examples

Display all roles in the system.

mysql> SHOW ROLES;
+---------------+
| Name          |
+---------------+
| root          |
| db_admin      |
| cluster_admin |
| user_admin    |
| public        |
| testrole      |
+---------------+

References