WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Database Error after repairing wp_comments in phpmyadmin (2 posts)

  1. kingkio
    Member
    Posted 1 year ago #

    I have recently started a blog at BlackLionsProfit.com. Everything was going along smoothly until I noticed that I had 5 comments pending (from myself whilst testing comment threading) however when I click into the comment menu I was told there was no results.

    Searching for a resolution I came across the following resolved thread:

    http://wordpress.org/support/topic/pending-comments-not-showing

    Within the thread was a a guide on how to repair WP_comments in PHPmyAdmin.
    http://www.crazybulb.com/blogging/wordpress-blank-page-after-posting-a-comment-wp-comment-post-php/

    Following the instructions I logged into my database, ticked the check box against the table wp_comments and selected "Repair Table" from the drop-down box.

    However, since my storage engine does not support repair table I had to do the repair manually through the supplied script.

    DROP TABLE IF EXISTSwp_comments`;
    CREATE TABLE wp_comments (
    comment_ID bigint(20) unsigned NOT NULL auto_increment,
    comment_post_ID int(11) NOT NULL default '0',
    comment_author tinytext NOT NULL,
    comment_author_email varchar(100) NOT NULL default '',
    comment_author_url varchar(200) NOT NULL default '',
    comment_author_IP varchar(100) NOT NULL default '',
    comment_date datetime NOT NULL default '0000-00-00 00:00:00',
    comment_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
    comment_content text NOT NULL,
    comment_karma int(11) NOT NULL default '0',
    comment_approved varchar(20) NOT NULL default '1',
    comment_agent varchar(255) NOT NULL default '',
    comment_type varchar(20) NOT NULL default '',
    comment_parent bigint(20) NOT NULL default '0',
    user_id bigint(20) NOT NULL default '0',
    PRIMARY KEY (comment_ID),
    KEY comment_approved (comment_approved),
    KEY comment_post_ID (comment_post_ID),
    KEY comment_approved_date_gmt (comment_approved,comment_date_gmt),
    KEY comment_date_gmt (comment_date_gmt)
    ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;`

    After "repairing" the table I tried to visit my wordpress dashboard to see if the problem had to be resolved. I got the following error:

    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at 10.168.1.58. This could mean your host's database server is down.
    
    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    going directly to blacklionsprofit.com gives me another database error:

    Error establishing a database connection

    I am pretty much a novice/amatuer at everything to do with coding, I usually get through the technical side of my websites by relying on the knowledge and experience of my peers. If anyone can help me troubleshoot then I would be extremely grateful.

  2. kingkio
    Member
    Posted 1 year ago #

    Sigh.

    Amatuer mistake on my part, Since it was my first time logging in to the myphpadmin I didn't know the password so changed it to something different.

    Updating the password on the wpconfig.php fixed it.

Topic Closed

This topic has been closed to new replies.

About this Topic