Check and Repair MySQL Databases

Database tables can become corrupted after server crashes, disk errors, or interrupted write operations. Symptoms include missing data, slow queries, or error messages mentioning table corruption.

cPanel includes built-in tools to check for and repair these issues.

Don’t have time to read our full article? Watch our walk-through video.

Checking a Database

  1. First, you will need to be logged in to cPanel.
  2. Once inside cPanel, click on MySQL Databases.

    MySQL Databases icon
  3. In MySQL Databases, scroll to Modify Databases.
  4. Select your database from the Check Database dropdown.
  5. Click Check Database.

cPanel runs a diagnostic and reports whether the tables are healthy or need repair.

Repairing a Database

  1. In the Modify Databases section, select your database from the Repair Database dropdown.
  2. Within this page, you will see a section labeled Modify Databases. To repair a database, select the database that you want to check and repair in the dropdown next to Repair Database, and click on Repair Database.

    Repair Database button
  3. cPanel will then check and automatically repair all tables that require it.

    repair results page

This process works well for minor corruption. Severe corruption may require restoring from a backup or using command-line tools like mysqlcheck.

For more control over individual tables, use phpMyAdmin to repair and optimize specific tables.

Congratulations, now you know how to check and repair databases in the MySQL Databases section of cPanel. We also have a helpful guide on How to Check and Repair a Database in phpMyAdmin.

Share this Article

One thought on “Check and Repair MySQL Databases

  1. Guys, I am not technical and panic when I get database errors on my SMF forums.  However, your tutorial was crystal clear.  It took me five minutes to fix the problem and get my forum back on line.  Thanks!

Comments are closed.