Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Just in case if you are using Monit version 5.1.1 and try to monitor mysql with sock it will always fail with "Connection failed"

my monit configuration file is:

check process mysql with pidfile /var/lib/mysql/mysql.pid
   group database
   start program = "/etc/init.d/mysql start"
   stop program = "/etc/init.d/mysql stop"
   if failed unixsocket /var/lib/mysql/mysql.sock protocol MYSQL then restart
   if 5 restarts within 5 cycles then timeout

The logs was not showing any clear error and all posts in internet was about using TCP to mysql.

The solution that I found was to upgrade monit to 5.6, after the upgrade monit will be able to monitor mysql sock without any issue.

Using: CentoOS 6 Monit 5.1.1-4.el6 from repository epel

share|improve this question
    
BTW: this is not a question, I just want to post the issue and the solution for any CentOS user, it seems I will not be able to mark it as answered, I have to wait for 10 hours :( –  AFT Oct 2 '13 at 18:56
    
Are you using MySQL 5.5? That would make sense since the monit changelog states for 5.2.3: * Mysql protocol test supports mysql 5.5.x and newer now. –  yoonix Oct 2 '13 at 22:00
    
Yes I'm using MySQL 5.5 –  AFT Oct 4 '13 at 2:20

1 Answer 1

up vote 0 down vote accepted

The solution that I found was to upgrade monit to 5.6, after the upgrade monit will be able to monitor mysql sock without any issue.

Note: Also please check Yoonix comment regarding Monit support for MySQL 5.5

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.