Back to Starrocks

SHOW USERS

docs/en/sql-reference/sql-statements/account-management/SHOW_USERS.md

4.1.01.0 KB
Original Source

SHOW USERS

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

SHOW USERS displays all users in the system. Users mentioned here are user identities, not user names. For more information about user identities, see CREATE USER. This command is supported from v3.0.

You can use SHOW GRANTS FOR <user_identity>; to view the privileges of a specific user. For more information, see SHOW GRANTS.

<UserManagementPriv />

Syntax

SQL
SHOW USERS

Return fields:

FieldDescription
UserThe user identity.

Examples

Display all users in the system.

SQL
mysql> SHOW USERS;
+-----------------+
| User            |
+-----------------+
| 'wybing5'@'%'   |
| 'root'@'%'      |
| 'admin'@'%'     |
| 'star'@'%'      |
| 'wybing_30'@'%' |
| 'simo'@'%'      |
| 'wybing1'@'%'   |
| 'wybing2'@'%'   |
+-----------------+

References

CREATE USER, ALTER USER, DROP USER