WatchMySQL wont start
This page will help you troubleshoot why the WatchMySQL daemon wont start.
Running WatchMySQL in the foreground
A simple way to see the errors that are being displayed by WatchMySQL is to simple run WatchMySQL with the -f switch. This will run WatchMySQL in the foreground and stop STDOUT and STDERR redirection.
root@server [~]# watchmysql -f No username/password could be found to access MySQL in /etc/watchmysql.config or in ~/.my.cnf
Tailing the log file
WatchMySQL sends out STDOUT and STDERR output to a log file unless run in foreground mode. Viewing this log file will usually tell you exactly whats going on.
root@server [~]# tail /var/log/watchmysql No username/password could be found to access MySQL in /etc/watchmysql.config or in ~/.my.cnf
No username/password could be found...
This problem normally happens when your running a older version of WatchMySQL. The reason for this error has to do with MySQL changing the parameters in the my.cnf file. Older versions of MySQL used the user parameter but newer versions now use username. When you upgrade MySQL in cPanel/WHM it automatically converts your my.cnf from using user to username thus breaking WatchMySQL in the Process. Newer version of WatchMySQL now check for both user and username and the solution is to simply reinstall/upgrade WatchMySQL.
cd /usr/src rm -f latest-watchmysql wget download.ndchost.com/watchmysql/latest-watchmysql sh latest-watchmysql
DBI and/or DBD::mysql not installed or broken
The WatchMySQL daemon relies on the perl DBI and DBD::mysql modules. If you recently did a MySQL upgrade where the major version changed (ex: going from 5.1.x to 5.5.x) then you need to rebuild these modules so they link to the correct mysql libs. Run the following commands
export -n PERL5LIB PERL_LOCAL_LIB_ROOT PERL_MB_OPT PERL_MM_OPT cpan -i -f DBI cpan -f -f DBD::mysql service watchmysql start