router_user_definition
The router_user_definition system table has one row for each router user account of a database cluster group for Aurora.
Purpose
Use this table to see who can sign in at the routing endpoint. It shows the settings and privileges for database cluster groups for Aurora of each account. It holds no password hashes. To review the router users and their privileges on a schedule, see Router users and routing layer privileges. Keep the following points in mind when you read the table:
-
You manage router users at the routing endpoint, and the table shows the result. On Aurora MySQL, each user management statement takes effect at once and commits on its own, so the routing layer refuses it inside an open transaction with error 1179. Commit or roll back first.
-
A router user resolves to the member cluster user of the same name. Creating or changing a router user doesn't create or change that member cluster user. Each member cluster checks data privileges for its own user.
The table is read-only. Change router users with the user management statements, not with INSERT, UPDATE, or DELETE.
Columns and example queries
The table is dbclustergroup_sys.router_user_definition. On Aurora MySQL, manage router users with CREATE USER, ALTER USER, DROP USER, GRANT, and REVOKE at the routing endpoint. The table lists the seed user, which receives the privilege dbclustergroup_super_admin when you create the group.
Columns
The table has the following columns.
| Column | Type | Description |
|---|---|---|
username |
Identifier | The user name. |
host |
String | The client host that the account can connect from. |
authentication_method |
String | How the account authenticates. |
account_locked |
Boolean | Whether the account is locked. |
password_expired |
Boolean | Whether the password has expired. |
password_expiry_interval_days |
Positive integer | The password lifetime in days. |
require_ssl |
Boolean | Whether the account must connect with TLS. |
privileges |
String | A comma-separated list of the privileges for database cluster groups for Aurora that the account holds, such as dbclustergroup_metadata_admin. |
grantable_privileges |
String | The privileges for database cluster groups for Aurora that the account can grant. |
Where to query it
Query the table at the routing endpoint, in an unpinned session. To read the table, you need dbclustergroup_user_admin.
The routing layer refuses INSERT, UPDATE, and DELETE on the table, for example with INSERT is not supported on router_user_definition; use CREATE USER instead. A WHERE clause takes one equality with a quoted literal. For the query shapes that work, see Filters the system tables accept.
Example queries
The following query lists every router user account.
SELECT * FROM dbclustergroup_sys.router_user_definition;
The following query lists every host part of one user, for example before you lock the user.
SELECT username, host, account_locked FROM dbclustergroup_sys.router_user_definition WHERE username = 'app_user';
Related topics
For more information, see the following topics:
-
Router users and routing layer privileges, for router users, member cluster users, and the privileges for database cluster groups for Aurora