LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Nagios3 facing difficulties in retrieving MySql DB status.. with these messages.. (https://www.linuxquestions.org/questions/linux-networking-3/nagios3-facing-difficulties-in-retrieving-mysql-db-status-with-these-messages-903657/)

linuxFreshMan 09-18-2011 05:58 AM

Nagios3 facing difficulties in retrieving MySql DB status.. with these messages..
 
hi everybody.. am facing a bit of a tricky problem here.. its my nagios3 again :( it keeps showing me that my MySql DBMS is CRITICAL while i KNOW it is NOT.. and displaying these error messages :
1>
Code:

Access denied for user 'root'@'MY IP ADDRESS GOES HERE' (using password: NO)
and displaying this for another server (another MySql):
2>
Code:

Can't connect to MySQL server on 'MY.IP.ADDRESS.GOES HERE' (111)
the third one is :
3>
Code:

Host 'My IP ADDRESS GOES HERE' is not allowed to connect to this MySQL server
HELP PLEASE :-)

kforbus 09-18-2011 10:10 PM

Is this just something that started suddenly or have you always gotten these errors when trying to monitor a mysql instance on a (I'm assuming remote machine)? If it is, in fact, a remote machine, have you commented out the skip-networking line and added a bind-address=<your mysql server address> line to your my.cnf? Until that is done, your mysql server probably won't accept connections from remote machines. Just a thought.

linuxFreshMan 09-19-2011 02:20 AM

thanks for replying :) and yes i always had this errors.. and also yes Ive tried to do the bind-address thing but no use unfortunately.. one friend here told me to try to create a nagios user on MySql and grant it the proper rights and try that.. so i will try it.. i hope you keep following with me :) thanks again

linuxFreshMan 09-19-2011 04:05 AM

I've try the last one i told you but no use too :(

kforbus 09-19-2011 11:22 PM

When you tried creating the new database user, did you specify the host portion to be the IP of your nagios server that the connections will be coming from? Like:
Code:

GRANT ALL ON foo.* TO someuser@'192.168.1.10' IDENTIFIED BY 'SOME_PASSWORD';
where foo is replaced by the name of your database and 192.168.1.10 is replaced with your nagios server IP address.

For instance, if you're specifying in your nagios check that it should log into mysql using the root account, then you'd want to add root@'your nagios IP' to all your mysql databases.

Doing the above should at least help get rid of error #3 in your original post.

Let me know if you have any luck.


All times are GMT -5. The time now is 01:29 PM.