# mysql.tables\_priv Table

1. PARTITION BY SYSTEM\_TIME is not supported for transaction-precise system-versioned tables. Attempting

The `mysql.tables_priv` table contains information about table-level privileges. The table can be queried and although it is possible to directly update it, it is best to use [GRANT](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md) for setting privileges.

Note that the MariaDB privileges occur at many levels. A user may be granted a privilege at the table level, but may still not have permission on a database level, for example. See [privileges](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md) for a more complete view of the MariaDB privilege system.

The [INFORMATION\_SCHEMA.TABLE\_PRIVILEGES](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-table_privileges-table.md) table derives its contents from `mysql.tables_priv`.

This table uses the [Aria](/docs/server/server-usage/storage-engines/aria.md) storage engine.

The `mysql.tables_priv` table contains the following fields:

| Field        | Type                                                                                                                                                                    | Null | Key | Default            | Description                                                                                                                                                         |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | --- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Host         | char(60)                                                                                                                                                                | NO   | PRI |                    | Host (together with User, Db and Table\_namemakes up the unique identifier for this record.                                                                         |
| Db           | char(64)                                                                                                                                                                | NO   | PRI |                    | Database (together with User, Host and Table\_namemakes up the unique identifier for this record.                                                                   |
| User         | char(80)                                                                                                                                                                | NO   | PRI |                    | User (together with Host, Db and Table\_namemakes up the unique identifier for this record.                                                                         |
| Table\_name  | char(64)                                                                                                                                                                | NO   | PRI |                    | Table name (together with User, Db and Tablemakes up the unique identifier for this record.                                                                         |
| Grantor      | char(141)                                                                                                                                                               | NO   | MUL |                    |                                                                                                                                                                     |
| Timestamp    | timestamp                                                                                                                                                               | NO   |     | CURRENT\_TIMESTAMP |                                                                                                                                                                     |
| Table\_priv  | set('Select', 'Insert', 'Update', 'Delete', 'Create', 'Drop', 'Grant', 'References', 'Index', 'Alter', 'Create View', 'Show view', 'Trigger', 'Delete versioning rows') | NO   |     |                    | The table privilege type. See [Table Privileges](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md#table-privileges) for details.    |
| Column\_priv | set('Select', 'Insert', 'Update', 'References')                                                                                                                         | NO   |     |                    | The column privilege type. See [Column Privileges](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md#column-privileges) for details. |

The [Acl\_table\_grants](/docs/server/server-management/variables-and-modes/server-status-variables.md#acl_table_grants) status variable indicates how many rows the `mysql.tables_priv` table contains.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/system-tables/the-mysql-database-tables/mysql-tables_priv-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
