Monit is configured to watch MySQL on localhost at port 3306.
check process mysqld with pidfile /var/lib/mysql/li175-241.pid
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed port 3306 protocol mysql then restart
if 5 restarts within 5 cycles then timeout
My application, which is configured to connect to MySQL via localhost:3306, is running just fine and can access the database. I can even use MySQL Query Browser to connect to the database remotely via port 3306. The port is totally open and possible to connect to. Therefore, I'm pretty darn certain that it's running.
However, running monit -v
reveals that Monit cannot detect MySQL on that port.
'mysqld' failed, cannot open a connection to INET[localhost:3306] via TCP
This happens consistently, until Monit decides not to track MySQL anymore, as configured.
How can I begin to troubleshoot this issue?
sudo netstat -lnp | grep mysql
returns the following:
tcp 0 0 173.230.135.241:3306 0.0.0.0:* LISTEN 14357/mysqld
unix 2 [ ACC ] STREAM LISTENING 265228 14357/mysqld /var/run/mysqld/mysqld.sock