Page 1 of 1

A database connection error has been detected after changing

Posted: Wed Jun 15, 2016 4:41 pm
by mdifiglia
I followed the document https://assets.nagios.com/downloads/nag ... 1465481631 to change the default passwords and now I get the following error:

Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.
Passwords.JPG

Re: A database connection error has been detected after chan

Posted: Wed Jun 15, 2016 4:43 pm
by mdifiglia
I ran the scripts below and the all successfully logged me into MySQL.

mysql -uroot -p<new password>
mysql -unagiosxi -p<new password>
mysql -undoutils -p<new password>
mysql -unagiosql -p<new password>

Re: A database connection error has been detected after chan

Posted: Wed Jun 15, 2016 5:01 pm
by rkennedy
Hey Mike,

Can you PM over or email me the following files as well so we can scrub through to see how things are looking?

Code: Select all

/root/scripts/automysqlbackup
/usr/local/nagiosxi/scripts/restore_xi.sh
/usr/local/nagiosxi/var/xi-sys.cfg
/usr/local/nagios/etc/ndo2db.cfg
/usr/local/nagiosxi/html/config.inc.php
/usr/local/nagvis/etc/nagvis.ini.php
/var/www/html/nagiosql/config/settings.php
/usr/local/nagiosxi/scripts/restore_xi.sh 

Re: A database connection error has been detected after chan

Posted: Thu Jun 16, 2016 2:33 pm
by mdifiglia
I emailed all 7 files as requested. I also restarted the ndo2db service as was suggested with no success.

Re: A database connection error has been detected after chan

Posted: Thu Jun 16, 2016 4:44 pm
by tgriep
The passwords for the nagios database do not match between the config.inc.php and the ndo2db.cfg file.
One of them has an s in it and the other doesn't.
Fix that and that should work for you.

Re: A database connection error has been detected after chan

Posted: Fri Jun 17, 2016 10:16 am
by mdifiglia
I fat fingered it ; ) Thank you for the help!!! Everything is up and running now :D

Re: A database connection error has been detected after chan

Posted: Fri Jun 17, 2016 11:06 am
by lmiltchev
Great! I am locking this thread and marking it as "resolved".