Check if you any need DB repair:
myisamchk –check /var/lib/mysql/*/*.MYI
Then try a ‘safe-recover’ as the first step:
myisamchk –safe-recover /var/lib/mysql/*/*.MYI
If the ‘safe-recover’ does not work, run a full recover:
myisamchk –recover /var/lib/mysql/*/*.MYI
Then use the ‘force’ flag to get things back to normal:
myisamchk –safe-recover –extend-check –force /var/lib/mysql/*/*.MYI
or:
myisamchk –recover –extend-check –force /var/lib/mysql/*/*.MYI
Option #2
Use the mysqlcheck tool to repair your databases.
mysqlcheck –all-databases -r #repair
mysqlcheck –all-databases -a #analyze
mysqlcheck –all-databases -o #optimize
No comments:
Post a Comment