SHOW PROPERTY
SHOW PROPERTY displays properties of a user, including the maximum number of connections, the default catalog, and the default database.
tip
The current user can view their own properties. Only users with the user_admin role can view the properties of other users.
info
To set properties such as database or catalog, use the ALTER USER command with SET PROPERTIES.
For max_user_connections, you can use the SET PROPERTY syntax.
Syntaxβ
SHOW PROPERTY [FOR 'user_name'] [LIKE '<property_name>']
Parametersβ
| Parameter | Required | Description |
|---|---|---|
| user_name | No | The user name. If not specified, the property of the current user is viewed. |
| property_name | No | The user property name. |
Examplesβ
Example 1: View the properties of the current user.
SHOW PROPERTY;
+----------------------+-----------------+
| Key | Value |
+----------------------+-----------------+
| max_user_connections | 1024 |
| catalog | default_catalog |
| database | |
+----------------------+-----------------+
Example 2: View the properties of the user jack.
SHOW PROPERTY FOR 'jack';
+----------------------+------------------+
| Key | Value |
+----------------------+------------------+
| max_user_connections | 100 |
| catalog | default_catalog |
| database | sales_db |
+----------------------+------------------+
Example 3: Filter properties using LIKE.
SHOW PROPERTY FOR 'jack' LIKE 'max_user_connections';
+----------------------+-------+
| Key | Value |
+----------------------+-------+
| max_user_connections | 100 |
+----------------------+-------+
See alsoβ
ALTER USER: Sets properties for a user.