2014/01/14

mysql host cache

★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.11.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 was added in MySQL 5.6.5.


MySQLでのホストのキャッシュをクリアするコマンド
mysqladmin -u root flush-hosts

これは、IP からホスト名に逆引きしようとしたときに MySQL でエラーが発生したことを意味する。この場合、mysqladmin flush-hosts を実行して内部 DNS キャッシュをリセットすることができる