Re: Flush Hosts Didn't Work
Posted by: Todd Farmer
Date: October 02, 2015 11:58AM

Hi Michael,

This error is triggered when a client opens a connection to MySQL Server, but does not complete the handshake process (server times out waiting on client response). Too many successive such failures is interpreted as a SYN flood attack, and the host is blocked. For example, you can use telnet to open a connection to MySQL Server, but it can't complete the authentication handshake - it doesn't know the protocol. It eventually times out, and the client host error counter maintained by the MySQL Server is incremented. When that counter reaches max_connect_errors, the host is blocked.

You really want to figure out where these connection attempts are originating, and put an end to it. It's quite likely not a SYN flood attack, but something is failing to connect appropriately to the MySQL Server. It could be an ancient MySQL connector, which doesn't understand the MySQL Server 5.5 handshake protocol. Or it could be some other process that's doing something unexpected (e.g., a monitoring script that checks whether MySQL is "alive" by just doing the equivalent of telnet). Your best bet is to enable the general query log or --log-warnings=2.

It's a bit strange that mysqladmin flush-hosts does not solve the issue, at least temporarily. Restarting MySQL Server will also flush the host cache.

Hope that helps.

Todd Farmer
MySQL @ Oracle

Options: ReplyQuote

Written By
October 01, 2015 01:00PM
October 01, 2015 09:50PM
Re: Flush Hosts Didn't Work
October 02, 2015 11:58AM
October 02, 2015 07:00PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.