Error establishing a database connection


#1

Hi,

I am a newbie and way over my head. I’ve been having some real issues with Porn Spam hacking into my site, so this morning I changed my passwords, but now I think I messed something up that I shouldn’t have touched, as now my website: www.whistlerbaby.com gives me the message: Error establishing a database connection"

Can someone help me please? I am just a writer, with little computer knowledge, so I need it in layman terms please?


#2

I presume wordpress correct, it means that you changed the password to the database, but you have not updated all the places the password is stored in. If you are a wordpress user, the password is in the file wp-config.php

You may want to read the thread ‘sites hacked’ and look at dhtr’s checklist to make sure your still not compromised.


#3

Hi Kelly,

I’m a complete novice, how do I change the password in the file wp-config.php?


#4

Hi-

I actually ran into the same problem when i changed my password, found your question and resolved it with Kelly’s instruction. Thank you Kelly.

@Whistler Baby- you have to locate the file wp-config.php which is in your root directory.
You can open it in a text edit program on your server side if you don’t have Dreamweaver or something similar for web editing.
Look for the part that states:

/** MySQL database password */
define(‘DB_PASSWORD’, ‘This-is-your-original-password’);

The ‘This-is-your-original-password’ is where your password is and needs to be changed. Make sense? This must match the new password. Change it to match your new password and save the file (if it is on server side). If you have to download the file from your site and
and open it with Dreamweaver or a web editor, make the change, save, and reupload it to the server to replace/overwrite the orig file. MAKE SURE NOT TO ACCIDENTALLY EDIT ANY OTHER PART OF THE FILE!

If you need further explanation let me know- this post helped me and I’d like to follow-up and help you if you’re still having issues.
I kind of assumed that since this was over a month ago you figured this out, but perhaps someone else will stumble on this and need a little more of an explanation.
Sorry if this is confusing to anyone. Didn’t realize how hard this was going to be to try to explain to someone who isn’t too familiar with this stuff.


#5

Just want to say thanks for this - helped me with similar problem today. So grateful for this support!