Page 1 of 1

MySQL database error

Posted: Thu Sep 22, 2016 1:07 pm
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?

Re: MySQL database error

Posted: Thu Sep 22, 2016 1:35 pm
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

Re: MySQL database error

Posted: Fri Sep 23, 2016 2:57 pm
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

Re: MySQL database error

Posted: Mon Sep 26, 2016 9:40 am
by tmcdonald
Mind if we close this up then?