A database connection error has been detected after changing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mdifiglia
Posts: 15
Joined: Mon Jun 13, 2016 10:59 am

A database connection error has been detected after changing

Post 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
You do not have the required permissions to view the files attached to this post.
mdifiglia
Posts: 15
Joined: Mon Jun 13, 2016 10:59 am

Re: A database connection error has been detected after chan

Post 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>
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: A database connection error has been detected after chan

Post 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 
Former Nagios Employee
mdifiglia
Posts: 15
Joined: Mon Jun 13, 2016 10:59 am

Re: A database connection error has been detected after chan

Post by mdifiglia »

I emailed all 7 files as requested. I also restarted the ndo2db service as was suggested with no success.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: A database connection error has been detected after chan

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mdifiglia
Posts: 15
Joined: Mon Jun 13, 2016 10:59 am

Re: A database connection error has been detected after chan

Post by mdifiglia »

I fat fingered it ; ) Thank you for the help!!! Everything is up and running now :D
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: A database connection error has been detected after chan

Post by lmiltchev »

Great! I am locking this thread and marking it as "resolved".
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked