Support » Installing WordPress » Error Establishing Database Connection

  • I had WP running perfectly on my site, and I wasn’t available for a few days. They got a new guy to work on the site, but he moved all of the contents of my /blog/ directory to the root path. Except he didn’t know what he was doing and it ended up messing up the database.

    I didn’t have a copy of the old db so I figured I would start fresh, thus I deleted all of the wordpress files off of my server.

    Now I created a new db/user etc and properly edited my config.

    I upload wordpress with my FTP client, and it uploads fine.

    When I go to the directory in my browser I get a “Error establishing a database connection”.

    I have never had a problem with WordPress before. I did some research on this error and it seems I’m not the first person to be experiencing it.

    If anyone has a fix or solution, feel free to help out a friend 🙂

    If you wish to see an example of the error, refer here:

Viewing 3 replies - 1 through 3 (of 3 total)
  • An error connecting to your database is very common but it isn’t a problem with wordpress itself.

    Firstly make sure you have put the right database name, database username and database password in config.php This is where most errors occur. Then check that you don’t need to change the database host from localhost. Check you have actually created a database with the same database name as is in your config file. Finally if all that information is correct your database probably has a problem with it and you may need to contact your web hosting.

    This topic has already been raised many times on these forums. Next time you have a problem make sure you thoroughly search the forums before posting. Otherwise you are wasting other people’s time and your own time.

    I have checked the settings in the wp-config.php file.
    I am not sure what should be for the host name.
    Netfirms Control panel shows the following:

    Connection Details: MYSQLHOST
    Remote Connection:

    Any clue or hint?

    Actually I tryed both and does not work.
    I get the same message, “Error establishing the database connection”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error Establishing Database Connection’ is closed to new replies.