How to repair a broken database

MySQL queries or tables stop working

If you get an error which says, “so-and-so is marked as crashed and needs to be repaired,” then you can easily fix this in cPanel.

Even if you are getting a different kind of error like “supplied argument is not a valid” or “table attribute does not exist”, then you can use this test to try and fix the problem.

  1. Login to cPanel and click MySQL Databases.
  2. Under Modify Databases, look for the drop-down called “Check DB”.
  3. Select the database name which is having trouble.
  4. Click the Check DB button.

This should reveal the cause of the problem. If the problem is “marked as crashed”, then proceed.

  1. Go back to MySQL Databases.
  2. Under Modify Databases, look for the drop-down called “Repair DB”.
  3. Select the database name which is having trouble.
  4. Click the Repair DB button.
  5. Once complete, reload your web site.