MySQL database corrupted: repairing tables
A database needs maintenance every now and then. A table can also become damaged. You'll then see messages like:
- is marked as crashed and should be repaired
- DB function failed with error number 145
Here's how to repair the tables:
- First make an export of the database, so you have a copy.
- Log in to DirectAdmin and under Account Manager, click MySQL Management.
- Click Manage next to the database.
- Under Database Operations, first click Check. If it finds an error, click Repair.

In the same place you'll also find Optimize. Prefer to do it per table? Then open phpMyAdmin under Extra Features, click the database on the left, tick the tables and at the bottom, under With selected, choose Repair table. With us, phpMyAdmin is in English. Doesn't repairing solve the problem? Then you can restore the database from WebOké Backups.
Detailed explanation with screenshots: Checking, repairing and optimizing a database in the DirectAdmin manual.
