DOCS

Repairing a database

What to do when a table looks corrupted or the application reports a database error.

Aggiornato 05.10.2026. 2 min di lettura

Errors such as "Table is marked as crashed", "Error establishing a database connection" or "Incorrect key file" sometimes mean a corrupted table. First of all export the database, see Importing and exporting a database.

Repair in cPanel#

  1. Open Databases → MySQL Databases.
  2. Near the bottom of the page under Modify Databases choose the database in Check Database and click Check Database.
  3. If errors are found, choose the same database in Repair Database and click Repair Database.

Repair in phpMyAdmin#

Open the database, tick the tables and from the With selected dropdown choose Repair table. The same dropdown also offers Optimize table for better speed.

If it still does not work#

  • Check that the connection details in the configuration are still correct: Connecting to a database from PHP.
  • "Error establishing a database connection" often means a wrong password or a changed user, not a corrupted table.
  • Restore the database from the last good copy: Restoring from a backup.

If the problem remains, send us a ticket with the exact error text and the database name (without the password).

Questo articolo ti è stato utile?

Articoli correlati

Still need a hand?

Open a ticket and we will reply by email. The whole team sees your request.