View Full Version : I think I've hosed my blog
Hi. Just before I learned about the automatic WordPress install feature, I created a mySQL database through OPS. I never did anything with that database, because I learned a few hours later (reading in this forum) about the automatic install and that worked great.
The other day, I thought I would "clean up" after myself and seem to have deleted the connection now between my WordPress files and my database. Going through the mySQL administration link in OPS I can see the correct blog database, including all the content I've posted. But going to my blog (www.bobsouer.com/blog/) gives me the following error message:
Error establishing a database connection! This probably means that the connection information in your wp-config.php file is incorrect. Double check it and try again.
I've looked at the wp-config.php file, double checked that the reference to the correct mySQL server (case sensitive), user name, etc. are correct. I just don't know what else to do at this point. I get the same error, by the way, when I try to login to post and/or administer the site.
Thank in advance for your help!
Bob Souer
alphadesk
5-30-05, 01:41 PM
Download your wp-config.php from the server and double check your DB info.
If your wp-config.php file is correct and you have checked everything you could try downloading a fresh copy of WordPress (http://wordpress.org/download/) and extracting a new copy of the wp-config.php file, add in the information and re-upload this new copy.
Sometimes that can fix random connection problems if the php file isn't being parsed correctly.
Also make sure that on your mySQL tab that there is still a user associated with the database. You may have accidently deleted the database user when removing the other database you created. Without any user assigned you can't connect to the database at all. If that checks out you could always try adding a new username and password and changing the wp-config file to contain the new user you make to see if its a problem with the existing user account. If so use the new one and get rid of the old one :)
Let us know how you get on though :)
fluKe,
You nailed it on the first try. I had killed my user name. So, I created a new user name, updated the wp-config.php file with the new information and my blog is now visible again. But, when I try to log in to administer, write, edit, etc. I get an error that says "Error: Wrong username." Now what?
Another quick question. Since I have a back-up of my posts and for that matter, I've only been blogging for a month so I could re-construct everything. How would I go about deleting WordPress and starting over? And is it possible, once created, to delete one of the mySQL databases? (No point in having one taking up server space if I don't need it.)
But, when I try to log in to administer, write, edit, etc. I get an error that says "Error: Wrong username." Now what?
Glad we got the first problem fixed :)
The standard username for accessing WordPress is "admin" try that and see if it works. If not log into phpMyAdmin (OPS >> Packages >> Web Site >> mySQL - link on that page) with your database username and password.
Once in on the left hand side expand the tree structure and click on the "wp_users" link. A list should appear in fromt of you. This is the list of tables in the database.
Tick the box next to "user_login" and then click browse at the top. You should see the information for the users that can access your blog. If admin is there go to your blog in another window and try logging in as "admin" with your password (not not the long string of letters shown in that row, that is an encrypted string..).
If that works you are in :) If not click the "edit" link on the left hand side. You should now be presented with a way of editing the details for this user.
Change the value stored in the "user_pass" field to something else (a new password) go to the bottom and hit "go". Try logging in as "admin" with that password. If that works you should then go and change your password again from within WordPress itself. If not try going back to that MySQL entry and when changing the password as before select MD5 from the drop down list (if that doesn't work password might - I can't remember if this needs to be set or not you see) and try again.
If there were no users listed when you went to the "wp_users" table then that's your problem and you will need to manually add a new user to the database by clicking the "insert new row" link and filling in the appropriate details (with user_status set to 0) :)
One of those series of solutions should get you in ;)
Another quick question. Since I have a back-up of my posts and for that matter, I've only been blogging for a month so I could re-construct everything. How would I go about deleting WordPress and starting over? And is it possible, once created, to delete one of the mySQL databases? (No point in having one taking up server space if I don't need it.)
To delete WordPress you should remove all the WordPress files from your "htdocs" folder (or wherever they were put) on your FTP account. Then delete the mySQL database (can be done through phpMyAdmin I think). That's it gone.
For a manual install of the latest version of WordPress you can see my install guide here (http://www.soulflame.net/technical-help/powweb-wp-install-guide/) :) Or you can try the automatic install again if you like.
fluKe,
Thank you for the excellent and detailed answers. I was able to "get in" by logging in as "admin"; however, I'm not sure why but nothing I did while logged in would show up. For example, I noticed a typo in the title of one of my posts. I edited the post, clicked "Save" and things would appear to be saved, but nothing changed. The typo was not corrected.
Also, I tried writing a short post and publishing it. Again, nothing shows up. So, I've just contacted tech support and asked them to delete the database and I'm going to start over using your manual install information. (But I did keep a full backup of my database before taking this step, so hopefully when I start over I won't have to re-type everything.)
Again, thanks for the help.
Be well,
Bob Souer
Cool, I'm glad you got in.
Sounds like WordPress wasn't able to write to the database - very odd. It might have been caused by the database user not having correct access priviliges but I guess it doesn't matter now :)
I hope your new install goes well and you get it all working :) WordPress is very cool once it's working properlly!Any problems with the new install just say.
Again, thanks for the help.
Your very welcome, always glad to help :)
~ fluKe
fluKe,
OK. I've deleted, and re-installed using your most excellent and detailed instructions. I'm running the latest WordPress version.
So, now, my question is: can I upload my database backup to restore my previous blog contents? Or, am I going to risk hosing things again?
Thanks in advance.
Bob Souer
Restoring the database should just restore the data so from that angle you should be fine - however as we're not quite sure what caused the problem it may have been a setting in the database relating to the administration of the blog that messed things up for you.
I guess there are really three options:
a) Back-up your new blank database. Restore the old one, if it works great if not restore the new backup you just made.
b) Try restoring the database and if it messes it up carry out another fresh install of WordPress (although you would infact only have to create a clean database and run the install script again as all relevant files would still be on your server).
c) Do nothing and carry on from here (possibly manually re-enter the content).
And the choice... is yours ;)
I'm really not sure what the best option is. I personally would probably try (a) and if it did mess up and wasn't able to be restored with the clean new backup I would re-install... But then I am a glutten for punishment and enjoy doing things like that. There is always the possibility that you may end up having to install it again if you try to restore the db, but then again you may not :)
I'm glad I could help though :D
Do post when you're done so I know how you got on.
fluKe,
Well, the restore the database thing didn't work. As you surmised, something must have become corrupted in there.
So, before I blew away all of those tables, I exported to CSV format so that I could just copy and paste the old posts back into my newly re-created blog. The restore of the "new" blog went fine after I exported and then cleaned out the old tables.
I'm now re-building my blog. Thankfully, there was only a month of posts (around 22 I think) so not too gigantic. (I hope it's not completely crass to modify the post dates to reflect the original posting date and time.)
Again, my thanks for your help.
Be well,
Bob Souer
Ah well it was worth a shot :)
It's good that it's all working now though, I don't think modifying the dates would be a bad thing to do (not doing it might certainly confuse some people into thinking you have a very active social life..).
Clever idea exporting the database too :)
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.