

# 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
<a name="databaseclustergroups-sysviews-router-user-definition-purpose"></a>

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](databaseclustergroups-router-users.md). 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
<a name="databaseclustergroups-sysviews-router-user-definition-columns"></a>

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](databaseclustergroups-system-views.md#databaseclustergroups-sysviews-filters).

**Example queries**

The following query lists every router user account.

```sql
SELECT * FROM dbclustergroup_sys.router_user_definition;
```

The following query lists every host part of one user, for example before you lock the user.

```sql
SELECT username, host, account_locked
  FROM dbclustergroup_sys.router_user_definition
 WHERE username = 'app_user';
```

## Related topics
<a name="databaseclustergroups-sysviews-router-user-definition-related"></a>

For more information, see the following topics:
+ [Router users and routing layer privileges](databaseclustergroups-router-users.md), for router users, member cluster users, and the privileges for database cluster groups for Aurora
+ [Encryption in transit (TLS) and at rest](databaseclustergroups-tls.md)
+ [Troubleshooting connection and sign-in problems](databaseclustergroups-ts-connections.md)