Edit (total new answer)
I have Googled a bit about this issue and found some clue :
MySql does not really like when :
- a connection is made on port 3306 without authentication
- a socket is openened and then dropped without any SQL handshaking
So, a workaround could be to perform a real
MySql connection and run a query.
Here is a way to do it. You will need to install
mysql-client on the monitoring server and grant correct access on MySql server.
Monit check setup :
check program mysql with path "/root/mysql_check.sh"
if status != 0 then alert
mysql -u<user> -p<password> --host=xx.xx.xx.xx <<END
SHOW VARIABLES LIKE "%version%";
mysql_check.sh should also be valid for a custom
I have tested this successfully (means can run the query remotely), but as far as i cannot reproduce the
blocked host issue on my
MySql 5.5 server i cannot tell if this actually solves the issue.
Give it a try and tell me what the result is.
My references :