WordPress.org

Support

Support » How-To and Troubleshooting » wp_comments sql error

wp_comments sql error

  • shiznaught
    Member

    @shiznaught

    This is the error I get in the admin section of my blog:

    WordPress database error: [Can’t find file: ‘wp_comments.MYI’ (errno: 2)]
    SELECT COUNT(*) FROM wp_comments WHERE comment_approved = ‘0’

    WordPress database error: [Can’t find file: ‘wp_comments.MYI’ (errno: 2)]
    SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_approved = ‘spam’

    I believe this happened after I deleted all of the comment spam. Now I get the error, and all my comments are gone. I do have a back up of the database.

    Thanks for any suggestions. (wordpress 2.0.4)

Viewing 1 replies (of 1 total)
  • DogRatCom
    Member

    @dogratcom

    I feel your pain! I had the same problem hit a week ago with 2.0.5. (http://www.dograt.com) Error number 2 can’t be repaired, because the table file is g-o-n-e! The comments are, I think, still there, because the posts show the comment counts, but without the table they’re not available.

    I’m tempted to trying running upgrade.php to see if it can re-create wp_comments.MYI, but my assumption is it won’t work and, if anything, will further screw things up.

    I have a backup, but it’s not terribly recent. I’d rather look into phpMyAdmin to re-creating the table from the comments, or try upgrade.php.

    If I take the restore route, I’ll need just the comments, as everything else seems to be all right. Obviously, I need more experience with this level of WordPress/mySQL, but it would be helpful if somebody with more knowledge could help guide the way.

    Thanks…

Viewing 1 replies (of 1 total)
  • The topic ‘wp_comments sql error’ is closed to new replies.