Exclude IP from being blocked by MySQL
I have a 4-year-old post on how to schedule FLUSH HOSTS:


How do you tell which host is close to being blocked in MySQL?


In that old post, I mentioned two techniques


TECHNIQUE #1 : Use MySQL Event (See the event code from my old post)
TECHNIQUE #2 : Run perl script (See the perl code from my old post)


Setup Parameters to Heartbeat
Connect to the mysqld
Hold DB Connection open indefinitely
Run FLUSH HOSTS; on the set schedule



In either case, FLUSH HOSTS; can be executed regularly.

Notwithstanding, you should be polling status variables

SELECT * FROM information_schema.global_status
WHERE variable_name LIKE '%connect%';


to monitor connections attempts, dropped connections, and thing like these.