Error establishing a database connection

I seem to be having a lot of mysterious trouble with my wordpress blogs on my site. I’m certain I did something to cause it, but I’m not sure exactly what.

Currently I keep getting informed at that there’s an error establishing a database connection. And then I can’t get into an admin stuff or do much of anything without feeling like I am prodding at the innards of a creature that I do not understand.

The internet apparently says that my username and password in my wp-config might be wrong or its not connecting to the database server… none of which I have any idea how to solve.

This happened to me once before and I eventually got so frustrated with it that I eliminated the entire blog from existence the rest of the way. I figure this time I’ll ask for help, first.

Did you change the password to the database in the panel? If so you also need to change it in your wp-config file.

Did you delete a sub-domain? if the hostname was something like and you delete the sub-domain dev, after having moved wordpress you will also have to fix the wp-config file. You may also need to add a hostname on the mysql page in the panel.

what level of instruction do you need? do you know how to find the file? do you know how to edit a file and just need t know where to look?

I might have changed the password. I probably did but don’t remember entirely.
I don’t believe that I deleted a sub-domain. I had one set up for the blog specifically and it is still there in my “Database(s) on this server”.
I do have hostnames on the mysql page.

I don’t know how to find the file and don’t necessarily know how to edit it. I kind of bumble my way through these things usually. I have cyberduck and can do the FTP thing from my computer and know how to open html files in textedit… but mostly I’m ignorant of the subtitles of this process.

It’s definitely the password in your mysql account.

The file to open is wp-config.php and you can use textedit for that. In there is a value like this:

You have to edit that to use … your password :wink: You can get that password by going to your panel and clicking on MySQL Databases -

There, scroll down to your infoburst ID and click on it. You can show the password on that page.

I went ahead and changed wp-config.php to use that for you so your site is back up.

I found this two articles on web having solutions for various reasons…

We also are getting this error message at when attempting to load the site. In this case, we did change the password because of a security issue but made sure to edit the config file.

This is a client website and the first time we’ve had to change a mysql password. I’ve submitted a support ticket, double-checked the wp-config.php file to be sure the password, user name, host and database name is correct. We’ve searched through the forum and Google for a solution but nothing seems to be working. Any insights?

Two things off the top of my head, try changing the password in the panel again. It’s rare but it’s possible it didn’t change on the server for some reason. This password is case sensitive so make sure you doing it the same way in wp-config.

It’s also possible your logging into a different user on the web server and editing and old version of the file. To check this, look at manage domains in the panel, find the domain in question and look at the “web hosting” column. Is the “User” listed there the same one you are logging in to edit wp- config? It should be.

Tried changing the password already, to the old password and to a new password. Nothing.

Checked the user, it’s where we should be.

I’m sure you are aware, but just in case… The panel interface that changes the password doesn’t do so instantly. There is a delay there, and sometimes it seems to run a little longer that the 10-15 minutes the panel tells you, sometimes it seems to run a little long, like 20 minutes.

Hi sirius – I checked that your wp-config info was all correct, so that wasn’t the issue. I ran a regrant of your MySQL service’s user permissions, and your site is now loading correctly. :slight_smile: Hope that helps!

Please check mine too for My site DB is losing connection on and off. I emailed support. Waiting to hear back. Not fast enough.

I also can’t get into myPHPAdmin area. It shows “#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)”

Let’s close this thread now. If you have issues with a database connection, please open a new one.