Ok – that seems to work. Once I added that line and ran “monit validate”, here’s what I got:
===========
address@hidden [/var/lib/mysql]# monit validate
'mysqld' failed protocol test [MYSQL] at INET[server.fqdn:3306] via TCP -- MYSQL: error receiving login response
'mysqld' trying to restart
'mysqld' stop: /etc/init.d/mysql
Shutting down MySQL.... SUCCESS!
'mysqld' start: /etc/init.d/mysql
Starting address@hidden [/var/lib/mysql]# SUCCESS!
address@hidden [/var/lib/mysql]# monit validate
address@hidden [/var/lib/mysql]#
===========
From the looks of it, MySQL had hung again, and got restarted. Running validate a second time didn’t produce any response – so things appear to be running fine?? Any ideas?
Thanks,
Sourjya
From: Noel [mailto:address@hidden]
Sent: Friday, January 25, 2013 11:54 AM
To: address@hidden; This is the general mailing list for monit
Subject: Re: MySQL DB Connectivity Example
Hello,
I’m facing this issue with MySQL Server – the server process keeps running and you can do a check by telnet-ing to 3306 and it connects. But that’s where the server hangs. The standard monit config. For MySQL isn’t able to detect this issue, as both process & connection are working. If there a way, I can make monit not just connect, but authenticate and load a database as well to see if the server is actually in operational mode?
Thanks,
Sourjya
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general