With a recent OS upgrade, some of the mysql database tables got corrupted. Below is how I was able to get it repaired.
Stop mysql server.
Once mysql server is stopped, run a repair on all of *.MYI files via myisamchk:
Bring up the mysql server.
# myisamchk -r /var/lib/mysql/*/*.MYI
Run a mysqlcheck of all databases via:
Grep for "error" on the log and proceed to create a sql file to be run to repair the tables.
# mysqlcheck -c --all-databases | tee /tmp/dbcheck.log
The file output should be something like:
# grep error -B1 /tmp/dbcheck.log | grep -v "error\|--" | sed 's/\(.*\)/REPAIR TABLE \1;/' >/tmp/dbrepair.sql
Log into mysql and source the repair script:
REPAIR TABLE database1.table1;
REPAIR TABLE database1.table2;
REPAIR TABLE database2.table1;
That should run and repair all of the corrupted tables. Verify by running another check and maybe an extended one.
# mysql> source /tmp/dbrepair.sql
# mysqlcheck -c -e --all-databases