I have a "problem" with my Monit configuration.
The monitoring works as expected, but I get the following errors on the mysql error file /var/log/mysql/error.log
each time the monitoring script runs :
190821 10:47:49 [Warning] Access denied for user ''@'localhost' (using password: NO)
190821 10:48:19 [Warning] Access denied for user ''@'localhost' (using password: NO)
190821 10:48:49 [Warning] Access denied for user ''@'localhost' (using password: NO)
190821 10:49:19 [Warning] Access denied for user ''@'localhost' (using password: NO)
190821 10:49:49 [Warning] Access denied for user ''@'localhost' (using password: NO)
Here is my monit config file :
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
group database
group mysql
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed host localhost port 3306 protocol mysql then alert
depend mysql_bin
depend mysql_rc
check file mysql_bin with path /usr/sbin/mysqld
group mysql
include /etc/monit/templates/rootbin
check file mysql_rc with path /etc/init.d/mysql
group mysql
include /etc/monit/templates/rootbin
Is there a way to specify a username and password for the monit checks to prevent those warnings on the error log ?