Nagios XI 2024R1 upgrade bug
Posted: Wed Jan 10, 2024 2:26 pm
The upgrade script does not work if you have an offloaded database. Everything is setup expecting localhost or the mysql commands are run without specifying the offloaded server name.
The file /tmp/nagiosxi/nagiosxi/nagiosxi-db/mods/mysql/schema_60000_root.sql file assumes that everything is on localhost instead of an offloaded database. In addition, the SQL command does not pass the -h and database server. For instance:
mysql -u root --password="$mysqlpass" -h $cfg__db_info__nagiosxi__dbserver < nagiosxi/nagiosxi-db/mods/mysql/schema_60000_root.sql
Lastly, the commands will never work because the offloaded database instructions do not create the "GRANT OPTION" for the root user. https://assets.nagios.com/downloads/nag ... Server.pdf has the following on page 11:
GRANT ALL ON *.* TO root@'<IP_OF_NAGIOS_XI_SERVER>';
But it should read:
GRANT ALL ON *.* TO root@'<IP_OF_NAGIOS_XI_SERVER>' WITH GRANT OPTION;
The file /tmp/nagiosxi/nagiosxi/nagiosxi-db/mods/mysql/schema_60000_root.sql file assumes that everything is on localhost instead of an offloaded database. In addition, the SQL command does not pass the -h and database server. For instance:
mysql -u root --password="$mysqlpass" -h $cfg__db_info__nagiosxi__dbserver < nagiosxi/nagiosxi-db/mods/mysql/schema_60000_root.sql
Lastly, the commands will never work because the offloaded database instructions do not create the "GRANT OPTION" for the root user. https://assets.nagios.com/downloads/nag ... Server.pdf has the following on page 11:
GRANT ALL ON *.* TO root@'<IP_OF_NAGIOS_XI_SERVER>';
But it should read:
GRANT ALL ON *.* TO root@'<IP_OF_NAGIOS_XI_SERVER>' WITH GRANT OPTION;