22.10.10.1 The host_cache Table

As of MySQL 5.6.5, 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 DNS lookups. (See Section 8.12.5.2, “DNS Lookup Optimization and the Host Cache”.) The host_cache table exposes the contents of the host cache so that it can be examined using SELECT statements. The Performance Schema must be enabled or this table is empty.

The host_cache table has these columns:

FLUSH HOSTS and TRUNCATE TABLE host_cache have the same effect: They clear the host cache. This also removes rows from the host_cache table (because it is the visible representation of the cache) and unblocks any blocked hosts (see Section B.5.2.6, “Host 'host_name' is blocked”.) FLUSH HOSTS requires the RELOAD privilege. TRUNCATE TABLE requires the DROP privilege for the host_cache table.