Error can't connect to Mysql server


#1

hello
i try checking a Mysql database from nagios.
on nagios server, when i try the command
** /usr/lib/nagios/plugins/check_mysql -d ‘glpi-info’ -H #ip address# -u root -p #######**
i have this response
Can’t connect to MySQL server on ‘#ip address#’ (111)

on the mysql server, i only have a good response when i type : /usr/lib/nagios/plugins/check_mysql -d ‘glpi-info’ -H localhost -u root -p ######

when i check the mysql configuration, user root can access from % hosts.

have anybody a solution to solve this problem?
thanks


#2

what do the logs say?

either your user isn’t allowed (but i’d expect a different error) or your mysql is listening on localhost instead of the ip address.


#3

thank you for your help!
mysql was effectively learning on localhost.