sql error on restore

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
scheived
Posts: 26
Joined: Tue Jul 16, 2013 9:53 am

sql error on restore

Post by scheived »

Attempting to restore backup on centos6 I get,

Restoring MySQL databases...
ERROR 1005 (HY000) at line 1713: Can't create table 'nagiosql.tbl_lnkServicedependencyToServic


I tried to create the database manually and got the same error, why can't we create this table?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: sql error on restore

Post by benjaminsmith »

Hi,

Just to clarify, are you restoring from a previous backup on the existing server or a new one? Let's start by running the database repair script, then try to run the restore again?

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Nagios XI Repairing The Nagios XI Databases

If this fails again, can you send over your system profile? And post the output of the following SQL command? Thanks. Benjamin

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked