Drupal Table Crashed! What now? Repair instructions.
I have accidentally crashed my node_revisions table while I was updating an old post today. The error message was huge and at first I panicked... but since I have listened to my own advice I have a backup of my database so it wasn't that bad. Still, restoring a database this large is tedious and, in most cases, unnecessary.
Follow these steps to repair your table if you use PHPMyAdmin:
- Log in to PHPMyAdmin.
- Click on the database name on the left
- Switch to SQL tab
- Type in REPAIR TABLE tablename (where tablename is the name of the table that comes up in your error message)
- Click Go.
Of course if that fails, I hope that you have your backups up to date ;) .
Naturally, if you're using some other program to manage your database you can still run the REPAIR TABLE command, but you'll need to figure out how to do it all by yourself ;) .