prevent runtime changes to the value of host_cache_size , but such changes have no effect and the cache is not re-enabled even if host_cache_size  is set larger than 0. 

To disable DNS host name lookups, start the server with the skip_name_resolve  system variable enabled. In this case, the server uses only IP addresses and not host names to match connecting hosts to rows in the MySQL grant tables. Only accounts specified in those tables using IP addresses can be used. (A client may not be able to connect if no account exists that specifies the client IP address.) 

If you have a very slow DNS and many hosts, you might be able to improve performance either by enabling skip_name_resolve  to disable DNS lookups, or by increasing the value of host_cache_size  to make the host cache larger. 

To disallow TCP/IP connections entirely, start the server with the skip_networking  system variable enabled. 

To adjust the permitted number of successive connection errors before host blocking occurs, set the max_connect_errors  system variable. For example, to set the value at startup put these lines in the server my.cnf  file: 

## Monitoring the Host Cache 

[mysqld] max_connect_errors=10000 

To change the value at runtime, do this: 

SET GLOBAL max_connect_errors=10000; 

The Performance Schema host_cache  table exposes the contents of the host cache. This table can be examined using SELECT  statements, which may help you diagnose the causes of connection problems. For information about this table, see Section 27.12.21.2, “The host_cache Table” . 

## Flushing the Host Cache 

Flushing the host cache might be advisable or desirable under these conditions: 

•Some of your client hosts change IP address. 

•The error message Host ’ host_name ’ is blocked  occurs for connections from legitimate hosts. (See Dealing with Blocked Hosts.) 

Flushing the host cache has these effects: 

•It clears the in-memory host cache. 

•It removes all rows from the Performance Schema host_cache  table that exposes the cache contents. 

•It unblocks any blocked hosts. This enables further connection attempts from those hosts. 

To flush the host cache, use any of these methods: 

•Change the value of the host_cache_size  system variable. This requires the SYSTEM_VARIABLES_ADMIN  privilege (or the deprecated SUPER  privilege). 

•Execute a TRUNCATE TABLE  statement that truncates the Performance Schema host_cache  table. This requires the DROP  privilege for the table. 

•Execute a FLUSH HOSTS  statement. This requires the RELOAD  privilege. 

