Repairing MySQL Tables
September 05, 2008
Today when I went to login to Expression Engine I was met with this lovely error:
“This table ‘whateverthetablenameisgoeshere’ is marked as crashed and should be repaired”
I thought others might benefit from the fix that I used, since it’s a MySQL error and not truly an Expression Engine issue. (Meaning it could get you on Textpattern, Wordpress, drupal, etc.) I don’t make a guarantee that this will always work in every case but the MySQL command I used to fix it was:
repair table `table_name_goes_here`;
Oh, and I’m going to write this down here for the record as well — if you need to login to MySQL from the command line it would look something like this:
mysql -u username_here --database=database_name_here -p
This just says “hey MySQL log me in with the username ‘username_here’ to the database ‘database_name_here’ and I have a password that I’ll tell you in a minute.”
Servers are configured differently and so you may need to have an actual login for the machine that holds your MySQL databases. Or, if you’re lucky, it seems that access to PHPMyAdmin will work if you have permissions to type in your own SQL statements.
Hopefully nobody has to use this, but I thought that documenting it would be nice.

