Home ~ Internet Marketing ~ Dvd Production ~ Our Products ~ Members area Login
Home Free Articles Free Articles How to fix Error “Establishing a Database Connection error” for a wordpress site

Tip of the week

Sign up to our FREE tip of the week
*Get new, marketing, website and product creation tips for your business.
As Featured On EzineArticles
Alex Cain sig
How to fix Error “Establishing a Database Connection error” for a wordpress site

If you have a wordpress site and you’re seeing the: Error Establishing a Database Connection to fix the problem you’ll need to...

1.Go to your file manager in your Cpanel then find the file named (wp-config php) then click edit code.

Now look for:

/** The name of the database for wordpress  */
Define (‘DB_NAME’,  ‘YOUR DATABASE NAME’);

/** MySQL database username */
Define (‘DB_USER’,  ‘YOURUSERNAME’);

/** MySQL database password */
Define (‘DB_PASSWORD’,  ‘DATABASE PASSWORD’);

/** MySQL hostname */
Define (‘DB_HOST’,  ‘localhost’);

One of these entries doesn’t match!

2.Go to your Cpanel, then go to mySQL Databases its under (Databases)

Then you’ll see your database name and your username (these are the name that should be in the wp config file)

3.Check to see if they’re correct! If they’re correct it’s either the user password or db host that’s wrong!

4.Now you need to make sure your database password is correct - if you don’t know your password create a new one by:

Moving down the mySQL Databases page and type in a new user - then password - then click (create new user) give the new user all privileges then click make changes - then click (go back).

You’ll now see a new user is added - now click the (red x and remove the old user) then click yes.

5.Now go back to the wp - config user file and change the USERNAME to your new username and then also change the DATABASE PASSWORD to the new password you just created.

6.Now see if your website is showing - if it still isn’t the problem is with the (local host) if your host is Godaddy, they don’t allow local host so you’ll need to contact them to find out what should be put there instead of local host.

/** MySQL hostname */
Define (‘DB_HOST’,  ‘local host or what goes here ask your host’);

It maybe an ip address or it could be a long address like (database1_host……)

But its defiantly one of those four that is causing the: Error Establishing a Database Connection

 
©2011 AC New Media, All Rights Reserved. Reproduction without permission prohibited.