Author: schester
• Thursday, September 07th, 2006

For the rest of you that have spent hours searching for how to fix the problem with the wordpress table (or any other table for that matter) that needs to be flushed because it didn’t get closed properly, here’s the short and sweet story of how to do it and get on with your life.

First, you can try going into phpMyAdmin and flushing the table, but that didn’t work for me. I fortunately have SSH access to the server, so I got in to the server and then issued the following:
mysql -u USER_NAME -p TABLE_NAME
Obviously, you need to substitute your own username and table name.
Once you’re into the mysql prompt, all you need to type is:
repair table wp_comments;
or, if you have another table to repair, the name of the table there.

Good luck! BTW – Comments should be working again. It was kind of nice not getting spam constatly while they were down though!

  • Share/Bookmark
Tags:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses

  1. Thanks for the fix. Repair table wp_comments; worked perfectly.

  2. Thanks Scott ! I fixed my wp_comments problem by running this query !

  3. This old blog post from 2006 is still of value 3 years later, 2009, when we got the same error without any clue what caused it. Thanks to this post, a quick “repair table … ” and it was fixed.

  1. [...] For some odd reason my comments database table decided to poop out on me a few days ago. I, unfortunately, didn’t realize this until today. Interestingly, the fix was to just run the SQL query “REPAIR table wp_comments“. Wow, if only every computer problem was that easy to fix.     add to deli.cio.us    digg it [...]

  2. [...] go out to schester blog for the [...]

Leave a Reply