Every once in a while, it may be necessary to repair one or more MySQL database tables. According to the How to Repair Tables article at dev.mysql.com there are a number of reasons to repair a table including errors such as "tbl_name.frm is locked against change", "Can't find file tbl_name.MYI (Errcode: nnn)", "Unexpected end of file", "Record file is crashed", or "Got error nnn from table handler".
Here are the steps to repair a table in a MySQL database using phpMyAdmin:
- Login to hosting account.
- Login to phpMyAdmin.
- Choose the affected database. If you only have one database, it should choose it by default so you don't need to do anything.
- In the main panel, you should see a list of your database tables. Check the boxes by the tables that need repair.
- At the bottom of the window just below the list of tables, there is a drop down menu. Choose "Repair Table"
Remember, that it is advisable to have a current backup of your database at all times.