Updated on 2026-11-06 GMT+08:00

Show Granted Permissions

Function

Displays the permissions that have been granted to a user on a resource.

Syntax

SHOW GRANT USER user_name ON resource;

Keywords

USER: Specifies that the following user_name is a user.

Precautions

resource can be a database, table, column, view, or function. The formats are as follows:

  • Database format: databases.db_name.
  • Table format: databases.db_name.tables.table_name.
  • Column format: databases.db_name.tables.table_name.columns.column_name.
  • View format: databases.db_name.tables.view_name.
  • Function format: databases.db_name.functions.function_name.

Example

Display the permissions of user user_name1 on database db1.

SHOW GRANT USER user_name1 ON databases.db1;