I installed monit on my Ubuntu 14.04 server and configured it to monitor mysql with the below config in monitrc.
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
Now to test I shutdown mysql user
service mysql stop
Monit does restart the server but the issue is that when I service status on mysql like below
service mysql status
It shows
mysql stop/waiting
But when I do
ps -e | grep "mysql"
I see the mysqld service running.
Any ideas why service mysql status wont show me running?
Thanks!