Repair A Crashed MySQL Table

I went through a bit of a scare with my blog today. All of a sudden I keep getting a barrage of emails informing me that my new WordPress blog had been successfully set up at Juixe TechKnow. I was like, WTF! I immediately emailed the technical support for my hosting provider but they did not know and give me any insight as to what happened to my blog. At first I thought I had been infected with a WordPress virus, or that someone at my hosting provider had inadvertently deleted my blog. As it turned out, as i dug around I discovered a ton of WordPress database errors that read like the following…

Table 'wp_options' is marked as crashed and should be repaired

As it turned out, only the WordPress options table had been corrupted and this was easy to fix simply by repairing that table.

To repair a MySQL table, log into your database using phpMydmin web client. Select you database from the database drop down on the left hand side. At this point, you should be looking at a list of all the tables in the database. Check the database table that has crashed and at the select repair table from the drop down options at the bottom of the list of tables. That should fix crashed or corrupted MySQL tables.

If you don’t have phpMyAdmin web client, you can just run the repair table command. From your MySQL query console enter the following.

REPAIR TABLE wp_posts

Technorati Tags: , , , ,