MySQL database error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

MySQL database error

Post by peter.zanetti »

We are having database issues and tried to run the database repair script, but the script is failing to stop the mysqld service. We also cant stop it manually without the script. We are seeing the following errors in the syslog:

Error: Could not connect to MySQL database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Sep 22 14:01:27 xxxxxxxx nagios: ndomod: Error writing to data sink! Some output may get lost. 4832 queued items to flush.
Sep 22 14:01:43 xxxxxxxx nagios: ndomod: Successfully reconnected to data sink! 935 items lost, 5000 queued items to flush.

Any idea on what caused this or how to fix it?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MySQL database error

Post by lmiltchev »

What is the version of Nagios XI that you are currently using?

Can you run the following commands, and show the output in code wraps?

Code: Select all

df -h
df -i
If using mysqld:

Code: Select all

service mysqld restart
service mysqld status
tail -100 /var/log/mysqld.log
If using mariadb:

Code: Select all

service mariadb restart
service mariadb status
tail -100 /var/log/mariadb/mariadb.log
Be sure to check out our Knowledgebase for helpful articles and solutions!
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Re: MySQL database error

Post by peter.zanetti »

We had a one of the unix guys take a look. Took him a while to get the service stopped but once he did that we ran the database_repair script again and that fixed the issue. Thanks
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: MySQL database error

Post by tmcdonald »

Mind if we close this up then?
Former Nagios employee
Locked