as well as the size of the host_cache  table. For operational and configuration information about the host cache, see Section 5.1.12.3, “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 host_cache  table has these columns: 

• IP 

The IP address of the client that connected to the server, expressed as a string. 

• HOST 

The resolved DNS host name for that client IP, or NULL  if the name is unknown. 

• HOST_VALIDATED 

Whether the IP-to-host name-to-IP DNS resolution was performed successfully for the client IP. If HOST_VALIDATED  is YES , the HOST  column is used as the host name corresponding to the IP so that additional calls to DNS can be avoided. While HOST_VALIDATED  is NO , DNS resolution is attempted for each connection attempt, until it eventually completes with either a valid result or a permanent error. This information enables the server to avoid caching bad or missing host names during temporary DNS failures, which would negatively affect clients forever. 

• SUM_CONNECT_ERRORS 

The number of connection errors that are deemed “blocking”  (assessed against the max_connect_errors  system variable). Only protocol handshake errors are counted, and only for hosts that passed validation ( HOST_VALIDATED = YES ). 

Once SUM_CONNECT_ERRORS  for a given host reaches the value of max_connect_errors , new connections from that host are blocked. The SUM_CONNECT_ERRORS  value can exceed the max_connect_errors  value because multiple connection attempts from a host can occur simultaneously while the host is not blocked. Any or all of them can fail, independently incrementing SUM_CONNECT_ERRORS , possibly beyond the value of max_connect_errors . 

Suppose that max_connect_errors  is 200 and SUM_CONNECT_ERRORS  for a given host is 199. If 10 clients attempt to connect from that host simultaneously, none of them are blocked because SUM_CONNECT_ERRORS  has not reached 200. If blocking errors occur for five of the clients, SUM_CONNECT_ERRORS  is increased by one for each client, for a resulting SUM_CONNECT_ERRORS value of 204. The other five clients succeed and are not blocked because the value of SUM_CONNECT_ERRORS  when their connection attempts began had not reached 200. New connections from the host that begin after SUM_CONNECT_ERRORS  reaches 200 are blocked. 

• COUNT_HOST_BLOCKED_ERRORS 

The number of connections that were blocked because SUM_CONNECT_ERRORS  exceeded the value of the max_connect_errors  system variable. 

• COUNT_NAMEINFO_TRANSIENT_ERRORS 

The number of transient errors during IP-to-host name DNS resolution. 

• COUNT_NAMEINFO_PERMANENT_ERRORS 

The number of permanent errors during IP-to-host name DNS resolution. 

