How to Repair a MySQL Database
Database corruption can cause errors or missing data. cPanel and phpMyAdmin both offer simple repair tools that fix most table-level problems.
Step-by-step
- Back up the database first — even a damaged one — via export, so nothing is lost.
- Open Databases → MySQL Databases in cPanel.
- Scroll to "Modify Databases" → Check Database, select the database and run the check to find errors.
- If errors are found, use Repair Database on the same page and select the database.
- Alternatively, use phpMyAdmin — open the database, tick the affected tables, and choose "Repair table" from the With selected dropdown.
- Re-test your site. If corruption persists, restore from a clean backup — see recovering from backup.
💡 Good to know
- Repeated corruption can indicate a deeper issue — contact EconomicalHost support if it recurs.
- Always export before repairing, so a failed repair does not make things worse.
- Optimising afterwards keeps the database healthy — see optimising.