# Performance Schema host\_cache Table

The `host_cache` table contains host and IP information from the host\_cache, used for avoiding DNS lookups for new client connections.

The host\_cache table contains the following columns:

| Column                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IP                                               | Client IP address.                                                                                                                                                                                                                                                                                                                                                                                                               |
| HOST                                             | IP's resolved DNS host name, or NULL if unknown.                                                                                                                                                                                                                                                                                                                                                                                 |
| HOST\_VALIDATED                                  | YES if the IP-to-host DNS lookup was successful, and the HOST column can be used to avoid DNS calls, or NO if unsuccessful, in which case DNS lookup is performed for each connect until either successful or a permanent error.                                                                                                                                                                                                 |
| SUM\_CONNECT\_ERRORS                             | Number of connection errors. Counts only protocol handshake errors for hosts that passed validation. These errors count towards [max\_connect\_errors](../../../../../server-management/variables-and-modes/server-system-variables#max_connect_errors).                                                                                                                                                                         |
| COUNT\_HOST\_BLOCKED\_ERRORS                     | Number of blocked connections because SUM\_CONNECT\_ERRORS exceeded the [max\_connect\_errors](../../../../../server-management/variables-and-modes/server-system-variables#max_connect_errors) system variable.                                                                                                                                                                                                                 |
| COUNT\_NAMEINFO\_TRANSIENT\_ERRORS               | Number of transient errors during IP-to-host DNS lookups.                                                                                                                                                                                                                                                                                                                                                                        |
| COUNT\_NAMEINFO\_PERMANENT\_ERRORS               | Number of permanent errors during IP-to-host DNS lookups.                                                                                                                                                                                                                                                                                                                                                                        |
| COUNT\_FORMAT\_ERRORS                            | Number of host name format errors, for example a numeric host column.                                                                                                                                                                                                                                                                                                                                                            |
| COUNT\_ADDRINFO\_TRANSIENT\_ERRORS               | Number of transient errors during host-to-IP reverse DNS lookups.                                                                                                                                                                                                                                                                                                                                                                |
| COUNT\_ADDRINFO\_PERMANENT\_ERRORS               | Number of permanent errors during host-to-IP reverse DNS lookups.                                                                                                                                                                                                                                                                                                                                                                |
| COUNT\_FCRDNS\_ERRORS                            | Number of forward-confirmed reverse DNS errors, which occur when IP-to-host DNS lookup does not match the originating IP address.                                                                                                                                                                                                                                                                                                |
| COUNT\_HOST\_ACL\_ERRORS                         | Number of errors occurring because no user from the host is permitted to log in. These attempts return [error code](https://github.com/mariadb-corporation/docs-server/blob/test/server/reference/sql-statements/administrative-sql-statements/system-tables/performance-schema/performance-schema-tables/broken-reference/README.md) 1130 ER\_HOST\_NOT\_PRIVILEGED and do not proceed to username and password authentication. |
| COUNT\_NO\_AUTH\_PLUGIN\_ERRORS                  | Number of errors due to requesting an authentication plugin that was not available. This can be due to the plugin never having been loaded, or the load attempt failing.                                                                                                                                                                                                                                                         |
| COUNT\_AUTH\_PLUGIN\_ERRORS                      | Number of errors reported by an authentication plugin. Plugins can increment COUNT\_AUTHENTICATION\_ERRORS or COUNT\_HANDSHAKE\_ERRORS instead, but, if specified or the error is unknown, this column is incremented.                                                                                                                                                                                                           |
| COUNT\_HANDSHAKE\_ERRORS                         | Number of errors detected at the wire protocol level.                                                                                                                                                                                                                                                                                                                                                                            |
| COUNT\_PROXY\_USER\_ERRORS                       | Number of errors detected when a proxy user is proxied to a user that does not exist.                                                                                                                                                                                                                                                                                                                                            |
| COUNT\_PROXY\_USER\_ACL\_ERRORS                  | Number of errors detected when a proxy user is proxied to a user that exists, but the proxy user doesn't have the PROXY privilege.                                                                                                                                                                                                                                                                                               |
| COUNT\_AUTHENTICATION\_ERRORS                    | Number of errors where authentication failed.                                                                                                                                                                                                                                                                                                                                                                                    |
| COUNT\_SSL\_ERRORS                               | Number of errors due to TLS problems.                                                                                                                                                                                                                                                                                                                                                                                            |
| COUNT\_MAX\_USER\_CONNECTIONS\_ERRORS            | Number of errors due to the per-user quota being exceeded.                                                                                                                                                                                                                                                                                                                                                                       |
| COUNT\_MAX\_USER\_CONNECTIONS\_PER\_HOUR\_ERRORS | Number of errors due to the per-hour quota being exceeded.                                                                                                                                                                                                                                                                                                                                                                       |
| COUNT\_DEFAULT\_DATABASE\_ERRORS                 | Number of errors due to the user not having permission to access the specified default database, or it not existing.                                                                                                                                                                                                                                                                                                             |
| COUNT\_INIT\_CONNECT\_ERRORS                     | Number of errors due to statements in the [init\_connect](../../../../../server-management/variables-and-modes/server-system-variables#init_connect) system variable.                                                                                                                                                                                                                                                            |
| COUNT\_LOCAL\_ERRORS                             | Number of local server errors, such as out-of-memory errors, unrelated to network, authentication, or authorization.                                                                                                                                                                                                                                                                                                             |
| COUNT\_UNKNOWN\_ERRORS                           | Number of unknown errors that cannot be allocated to another column.                                                                                                                                                                                                                                                                                                                                                             |
| FIRST\_SEEN                                      | Timestamp of the first connection attempt by the IP.                                                                                                                                                                                                                                                                                                                                                                             |
| LAST\_SEEN                                       | Timestamp of the most recent connection attempt by the IP.                                                                                                                                                                                                                                                                                                                                                                       |
| FIRST\_ERROR\_SEEN                               | Timestamp of the first error seen from the IP.                                                                                                                                                                                                                                                                                                                                                                                   |
| LAST\_ERROR\_SEEN                                | Timestamp of the most recent error seen from the IP.                                                                                                                                                                                                                                                                                                                                                                             |

The `host_cache` table, along with the `host_cache`, is cleared with [FLUSH HOSTS](../../../sql-statements/administrative-sql-statements/flush-commands/flush), [TRUNCATE TABLE](../../../sql-statements/table-statements/truncate-table) `host_cache` or by setting the [host\_cache\_size](../../../../../server-management/variables-and-modes/server-system-variables#host_cache_size) system variable at runtime.

<sub>_This page is licensed: CC BY-SA / Gnu FDL_</sub>

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