Damaged tables can't be repaired
Posted: Wed Oct 12, 2016 4:23 pm
This is in reference to this thread: https://support.nagios.com/forum/viewto ... 16&t=40465
That thread discusses the following not working. They still don't work to fix this issue.
I've noticed that the DB is still complaining, although things in the WUI look ok.
As you can see repairing the tables is not working. even when repairing using the command suggested in the referenced thread.
I need a solution...
That thread discusses the following not working. They still don't work to fix this issue.
Code: Select all
service mysqld stop; /usr/local/nagiosxi/scripts/repairmysql.sh nagios; service mysqld start
/usr/local/nagiosxi/scripts/repair_databases.shCode: Select all
# grep Incorrect /var/log/messages | grep "Oct 12" | awk '{print $NF}' | sort | uniq -c
253 'nagios_commands''
506 'nagios_configfiles''
14168 'nagios_configfilevariables''
253 'nagios_contactgroup_members''
253 'nagios_contactgroups''
253 'nagios_contact_notificationcommands''
253 'nagios_contacts''
506 'nagios_contactstatus''
253 'nagios_customvariables''
249489 'nagios_customvariablestatus''
253 'nagios_host_contacts''
253 'nagios_hostgroup_members''
253 'nagios_hostgroups''
6323 'nagios_logentries''
253 'nagios_runtimevariables''
253 'nagios_service_contacts''
253 'nagios_servicegroups''
20541 'nagios_systemcommands''
253 'nagios_timeperiods''
253 'nagios_timeperiod_timeranges''
Code: Select all
# echo "repair table nagios_commands;" | mysql -t -u root -pnagiosxi nagios;
+------------------------+--------+----------+-----------------------------------------+
| Table | Op | Msg_type | Msg_text |
+------------------------+--------+----------+-----------------------------------------+
| nagios.nagios_commands | repair | Error | Incorrect file format 'nagios_commands' |
| nagios.nagios_commands | repair | error | Corrupt |
+------------------------+--------+----------+-----------------------------------------+
# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
# echo "repair table nagios_commands;" | mysql -t -u root -pnagiosxi nagios;
+------------------------+--------+----------+-----------------------------------------+
| Table | Op | Msg_type | Msg_text |
+------------------------+--------+----------+-----------------------------------------+
| nagios.nagios_commands | repair | Error | Incorrect file format 'nagios_commands' |
| nagios.nagios_commands | repair | error | Corrupt |
+------------------------+--------+----------+-----------------------------------------+