WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (5 posts)

  1. Missa
    Member
    Posted 1 year ago #

    I've been getting this error message on and off now for a couple of weeks. I called my hosting company and they found nothing wrong with my account. Does anyone else know why this message continues to appear and what I need to look into in order to resolve this issue. This is the entire message:

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    Thank you.

    ~Adrienne

  2. If your site is managing to connect to your database sometimes, but not at other times, then to me, it sounds like there's something up with the database server.

    You could try resetting the database password and changing your wp-config.php, but if it did connect once, then the error lies with the server.

  3. Missa
    Member
    Posted 1 year ago #

    Yeah, if you refresh the page then it instantly connects. What needs to be done with the wp-config.php file? You can tell I'm not much of a pro at this.

    Thank you Christine for responding... It's just strange.

  4. michael.mariart
    Member
    Posted 1 year ago #

    Nothing needs to be done with your wp-config.php file. The problem lies in the server that your site is hosted on. That server is loosing it's connection to the database server from time to time. There's a few reasons why this could be, but this is something that you will have ot ask your hosting company. They'll need to investigate why the disconnections are happening, and they will (should...) have access to better log files then you do to diagnose what the problem is.

  5. Missa
    Member
    Posted 1 year ago #

    Thank you Michael, I'll call them again. Let them know what you said and see if I can get someone this time that possibly knows why I'm loosing the connection. I was afraid it was something on my end.

    I appreciate your help. Thank you!

    ~Adrienne

Topic Closed

This topic has been closed to new replies.

About this Topic