How to repair a crashed MySQL table/database

How to repair a crashed MySQL table/database

Symptoms: If your site/application is displaying something similar to:



Table './user_dbname/dbprefix_table' is marked as crashed and should be repaired



Resolution:



1. Access phpMyAdmin (link can be found in your control panel under Database -> MySQL -> MySQL Databases -> DB Name)

2. Select the database with the affected table from the pulldown list on the left side of the screen.

3. Click on the "SQL" tab on the right side of the screen

4. Type in the following and click "Go":



repair table tablename-to-be-repaired;



This will run a repair against just that table.



For a GUI method (and to repair multiple tables), please see http://paulstamatiou.com/how-to-quickie-repair-mysql-tables-in-phpmyadmin