Page 1 of 1

server migration database errors

Posted: Tue Jun 16, 2020 2:28 pm
by marquetteu
I'm trying to migrate from rhel6 to rhel8. i have both versions at the new 5.7. i did the backup and then restore. after that i did the restore repair, and then when i try to login i get:

Code: Select all

Database Error
A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.

Run the following from the CLI as root to attempt to repair the DB:

/usr/local/nagiosxi/scripts/repair_databases.sh
i have run the repair_databases.sh twice and it doesn't seem to fix the issue.

where do i go from here?

thanks

Re: server migration database errors

Posted: Tue Jun 16, 2020 2:54 pm
by marquetteu
Found the issue -- on our old server we changed the database passwords, and while the config files that were restored had the new passwords, the database was still using the default ones. once i changed it, everything started working again.

one thing to note, the documentation for changing passwords is out of date

documentation says:

Code: Select all

set password for 'nagiosxi'@localhost= password('NewPassword');
it should be:

Code: Select all

set password for 'nagiosxi'@localhost = 'NewPassword.';

Re: server migration database errors

Posted: Tue Jun 16, 2020 3:52 pm
by benjaminsmith
Hi @marquetteu,

Happy to hear you found the issue and it's working again.

We'll get that updated in the docs, thanks for pointing that out.