That sounds bad, and it is. But the fix in my case was pretty simple.
This happened on a WordPress instance that got slammed during load testing.
The exact error in the Apache log was:
[ERROR] /usr/libexec/mysqld: Table './weblogs/wp_options' is marked as crashed and should be repaired
Where weblogs is the name of my WordPress database and wp_options is a table in it.
Scary. The site itself reported a database connection error.
Fixing this required running mysqlcheck thus:
mysqlcheck -u root -p weblogs --auto-repair
I ran it first without the “–auto-repair” option because by that point I’d used up an entire day’s reserve of courage.
A more surgical method would have been to log onto the database as the root user using the mysql client and first verify the table really is broken:
use weblogs; check table wp_options;
If it is, then you can run repair against that table alone:
repair table wp_options;
Then run “check table” again to confirm it is fixed.
Google returned a ton of hits on the query “wp_options is marked as crashed and should be repaired”, but I immediately set aside all the ones that sent you to phpMyAdmin because… life is just too short.
Here are some posts that provided the right stuff:
All the above articles do a good job of providing a way to verify the problem and a means of fixing it.