On 18. aug.. 2009, at 07.16, Ramon Tayag wrote:
But I'm unable to monitor it (connection failed to 127.0.0.1:3306 [DEFAULT via TCP]), and I don't know why.
I would guess that this is because MySQL is setup to use unix sockets instead of TCP. If so, you can rewrite the test and monitor the unix socket instead:
check process mysql with pidfile /var/run/mysqld/mysqld.pid group database start program = "/etc/init.d/mysqld start" stop program = "/etc/init.d/mysqld stop" if failed unixsocket tmp/mysql.sock then restart if 5 restarts within 5 cycles then timeout -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
