restoring to different platform - mysql issues
Posted: Fri Oct 27, 2023 5:26 am
Hello
Current environment:
centos 7
nagiosxi 5.11.2
Installed new empty environment:
Ubuntu 22.04
nagiosxi 5.11.2
1) Used the Backing Up And Restoring Your Nagios XI System.pdf to restore current setup to the new one.
2) Used restore_repair.sh for cross platform repair, it ended with:
UPGRADE: POST-UPGRADE: NDO post upgrade started...
Performing install...
> Creating database with user
> Enter MySQL root password:
> Using command line supplied credentials for account/db creation...
> Username: ndoutils
> Password: *****
> Database: nagios
> Press <ENTER> to continue...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1007 (HY000) at line 1: Can't create database 'nagios'; database exists
Something went wrong creating database 'nagios'
Finished restore repair OK
3) In web ui, it gives error:
Database Error
Access denied for user 'nagiosxi'@'localhost' (using password: YES)
Run the following from the CLI as root to attempt to repair the DB:
/usr/local/nagiosxi/scripts/repair_databases.sh
4) i run repair_databases.sh but it doesnt change anything, error remains.
In nagios.log i see error:
[1698392554] NDO-3: NDO 3.1.0 (c) Copyright 2009-2023 Nagios - Nagios Core Development Team
[1698392554] NDO-3: Unable to connect to mysql. Configuration may be incorrect or database may have temporarily disconnected.
Database Error: Could not connect to database
Access denied for user 'nagiosxi'@'localhost' (using password: YES)
What am i missing here?
Also, during the restore proccess, it gives info - what is it refereing to, which subcomponents:
You will need to re-download the Nagios XI tarball, and re-installthe subcomponents for this system
Current environment:
centos 7
nagiosxi 5.11.2
Installed new empty environment:
Ubuntu 22.04
nagiosxi 5.11.2
1) Used the Backing Up And Restoring Your Nagios XI System.pdf to restore current setup to the new one.
2) Used restore_repair.sh for cross platform repair, it ended with:
UPGRADE: POST-UPGRADE: NDO post upgrade started...
Performing install...
> Creating database with user
> Enter MySQL root password:
> Using command line supplied credentials for account/db creation...
> Username: ndoutils
> Password: *****
> Database: nagios
> Press <ENTER> to continue...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1007 (HY000) at line 1: Can't create database 'nagios'; database exists
Something went wrong creating database 'nagios'
Finished restore repair OK
3) In web ui, it gives error:
Database Error
Access denied for user 'nagiosxi'@'localhost' (using password: YES)
Run the following from the CLI as root to attempt to repair the DB:
/usr/local/nagiosxi/scripts/repair_databases.sh
4) i run repair_databases.sh but it doesnt change anything, error remains.
In nagios.log i see error:
[1698392554] NDO-3: NDO 3.1.0 (c) Copyright 2009-2023 Nagios - Nagios Core Development Team
[1698392554] NDO-3: Unable to connect to mysql. Configuration may be incorrect or database may have temporarily disconnected.
Database Error: Could not connect to database
Access denied for user 'nagiosxi'@'localhost' (using password: YES)
What am i missing here?
Also, during the restore proccess, it gives info - what is it refereing to, which subcomponents:
You will need to re-download the Nagios XI tarball, and re-installthe subcomponents for this system