How can we repair a MySQL table?

How can we repair a MySQL table?

View Answers

November 13, 2010 at 3:39 PM

Hi,

we can repair Mysql table using SQL statement with following staps:

  1. In the tree to the left, click on the hmailserver database. The hMailServer database will now be active.
  2. In the right part of the SQLyog window, click on the Query tab.
  3. Enter REPAIR TABLE tablename, for example, REPAIR TABLE hm_messages.
  4. Click on the Execute Current Query button in the toolbar (or select Edit->Execute Query->Execute current query or press F5).
  5. MySQL should now repair the table. After the table has been repaired, restart the MySQL and than the hMailServer service. Depending on what table is corrupt, a restart of the services may not be required, but we recommend that you always do it.

Thanks









Related Tutorials/Questions & Answers:
Advertisements