MySQL 5.6 Reference Manual Including MySQL NDB Cluster 7.3-7.4 Reference Guide The host_cache Table

The host_cache table provides access to the contents of the host cache, which contains client host name and IP address information and is used to avoid Domain Name System (DNS) lookups. The host_cache_size system variable controls the size of the host cache, as well as the size of the host_cache table that exposes the cache contents. For operational and configuration information about the host cache, see Section, “DNS Lookups and the Host Cache”.

Because the host_cache table exposes the contents of the host cache, it can be examined using SELECT statements. This may help you diagnose the causes of connection problems. The Performance Schema must be enabled or this table is empty.

The host_cache table has these columns:

The FLUSH HOSTS statement, TRUNCATE TABLE host_cache statement, and mysqladmin flush-hosts command have the same effect: They clear the host cache, remove all rows from the host_cache table that exposes the cache contents, and unblock any blocked hosts (see Section B.3.2.6, “Host 'host_name' is blocked”). FLUSH HOSTS and mysqladmin flush-hosts require the RELOAD privilege. TRUNCATE TABLE requires the DROP privilege for the host_cache table.