WordPress.org

Ready to get started?Download WordPress

Forums

Error Establishing Database Connection (4 posts)

  1. xt1an
    Member
    Posted 5 years ago #

    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:

  2. tomontoast
    Member
    Posted 5 years ago #

    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.

  3. figaro
    Member
    Posted 5 years ago #

    @xt1an: See the following video to troubleshoot this problem:

    http://educhalk.org/blog/?p=148

  4. criada84
    Member
    Posted 5 years ago #

    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: mysql.netfirms.com

    Any clue or hint?

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

Topic Closed

This topic has been closed to new replies.

About this Topic