In my configuration of Monit, i test MySQL with this lines :
check process mysqld with pidfile /var/run/mysqld/mysqld.pid group database start program = "/etc/init.d/mysql start" stop program = "/etc/init.d/mysql stop" if failed host 127.0.0.1 port 3306 protocol mysql then restart if 5 restarts within 5 cycles then timeout
But, i've configured my server to not allow anonymous connections. So my server respond an Access Denied to Monit, wich is considered like a Success. I'm ok with that.
But, each time, MySQL detects an Aborted_connect and increments this variable. Is it possible to give user:password in configuration to test connection to MySQL ?