repairmysql.sh errors - INFO

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
pnewlon
Posts: 86
Joined: Mon May 16, 2011 2:19 pm

repairmysql.sh errors - INFO

Post by pnewlon »

I am in the process of upgrading from 1.3 -> 2.3 following the doc at http://assets.nagios.com/downloads/nagi ... ctions.pdf

When executing `mysqldump -u root -pnagiosxi nagios | bzip2 -c > /root/pre-upgrade-backup/my_nagios.sql.bz2` I got an error 'mysqldump: Got error: 144: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES'. Searching the forum archives, I found a reference to running repairmysql.sh to fix this issue. I got another error when running that script:

myisamchk: error: Quick-recover aborted; Run recovery without switch 'q'
MyISAM-table 'nagios_logentries.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag

Once I edited the script, changing
$cmd -r -q $t
to
$cmd -r $t

The repair ran successfully.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: repairmysql.sh errors - INFO

Post by scottwilkerson »

Thanks for posting this for others!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked