Dead Blog
Get this, I was editing my theme in the theme editor, going back and forth and BOOM!!!! Database connection error. This was NOT and DB connection error. The MySQL server was fine and nothing had changed. Looking at the DB via PHPmyAdmin and no overheard or anything. Repaired tables, nothing. still dead but the data looked good.
Of course if you google “wordpress database connection error” or any iteration of that you get a bunch of fools who don’t know how to config their blog and answers related to that. This wasn’t my problem. I knew it could connect because replacing the data with an old copy of the db via “mysql -p db <dbbackup brought it all back fine. Problem was I didn’t have a recent backup… despite my recent post on backing up databases
. This blog fell into the lower priority que and therefore didn’t get scripted for backup on the new box.
ANYWAY the point is for those folks who may be getting a DB connection error from wordpress and know it’s not a DB connection problem, I recommend using PHPmyAdmin to export your posts and/or comments table from the current (corrupt) DB and importing them to a known good copy of the DB. You can do this on a table by table basis to get your good and current data into the structure of an old (but non-corrupt) copy of the DB. I just did this and now the blog is back. Of course you’d want to check the data first and make sure it’s there/good.