Database Error after repairing wp_comments in phpmyadmin
-
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://ww.wp.xz.cn/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 TABLEwp_comments(
comment_IDbigint(20) unsigned NOT NULL auto_increment,
comment_post_IDint(11) NOT NULL default ‘0’,
comment_authortinytext NOT NULL,
comment_author_emailvarchar(100) NOT NULL default ”,
comment_author_urlvarchar(200) NOT NULL default ”,
comment_author_IPvarchar(100) NOT NULL default ”,
comment_datedatetime NOT NULL default ‘0000-00-00 00:00:00’,
comment_date_gmtdatetime NOT NULL default ‘0000-00-00 00:00:00’,
comment_contenttext NOT NULL,
comment_karmaint(11) NOT NULL default ‘0’,
comment_approvedvarchar(20) NOT NULL default ‘1’,
comment_agentvarchar(255) NOT NULL default ”,
comment_typevarchar(20) NOT NULL default ”,
comment_parentbigint(20) NOT NULL default ‘0’,
user_idbigint(20) NOT NULL default ‘0’,
PRIMARY KEY (comment_ID),
KEYcomment_approved(comment_approved),
KEYcomment_post_ID(comment_post_ID),
KEYcomment_approved_date_gmt(comment_approved,comment_date_gmt),
KEYcomment_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 connectionI 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.
The topic ‘Database Error after repairing wp_comments in phpmyadmin’ is closed to new replies.