Repairing a Crashed Table in phpMyAdmin

Published on February 8, 2010

I had a nasty surprise for me tonight when I realized none of my posts were available on my blog (the one you’re looking at now!). I could log into WordPress and see everything but my posts showed a count of zero (scary!). My first thought was to restore my latest backup only to realize my backup didn’t run this week. I did have the backup from last week so I logged into phpMyAdmin and this is where I found the actual problem. When I clicked on the wp_posts table, I received the following error:

#144 – Table ‘./wp_posts’ is marked as crashed and last (automatic?) repair failed

By no means am I a mysql expert. I’m still not sure why this even happened. However, this was actually not very difficult to correct in my case (once I found the cause and a few mysql forums) and I wanted to share the steps I went through to correct this:
1. Sign into your phpMyAdmin account
2. Click on your database name on the left
3. Then click on SQL in the tabs on the top
4. In the query box enter: repair table wp_posts and then click Go. (note: you’ll need to replace wp_posts with whatever table you are having an issue with if it’s not this table)

repair-wordpress-database

For me this took a little while to finish (probably less than one minute). After that, things were working well again. Obviously, this isn’t going to work in every case but if you’re lucky like I was, maybe it will. I’m still a little nervous as to why this happened in the first place but at least I now have an up-to-date backup if it happens again!

 

The eharmony Difference? Deep compatibility! Try it Today!

Brad
Author: Brad

Brad initially struggled with online dating but over time became quite successful using it. He met his wife using online dating and has been giving advice and helping people improve their results since 2007. He has written a Free Online Dating Guide to help others find success with online dating. You can learn more about his personal experience using online dating and running this website here.

Posted in: