• When I try to access my website https://www.mathcounterexamples.net hosted by Dreamhost I get the following message : “Error establishing a database connection”. This is happening since 48 hours, but not all the time. I would say 9 out of 10.

    In those cases when I access https://www.mathcounterexamples.net/wp-admin/ I get the message “Error establishing a database connection” with options of what can be the root causes.

    When I try to access the DB with phpMyAdmin, I get error message “#1040 – Too many connections”.

    I haven’t changed my DB credentials. It seems that the mySQL server is very unstable.

    I opened a ticket six hours ago with the highest severity at Dreamhost and got no response. Which is very disappointing…

    Do you have a clue of what can happen?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    In nutshell, you’re getting this error because WP is unable to establish a database connection. Reason why WP is unable to establish a database connection can vary. It could be that your database login credentials are wrong or have been changed. It could be that your database server is unresponsive. It could be that your database has been corrupted. Majority of the times this error happens because of some sort of server error. Also, there could be other factors as well.

    To troubleshooting this problem:
    – double check your wp-config.php file settings for the database name, database username and database password, and the host name (e.g., “localhost” Vs. something else). This is where most errors occur.
    – Then make sure wp-config.php is in right location.
    – Then check that you don’t need to change the database host from “localhost” to something else. You can get that info from your hosting provider.
    – Check you have actually created a database with the same database name as is in your wp-config.php file.
    – Last, but not least, if all that information is correct your database probably has a problem with it. Contact your hosting provider if the database server is offline (if the problem suddenly happened), or if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, or if the hosting package is set to Windows and not Linux, etc.
    – If the error is intermittent then it’s your server. What’s happening is that the web server and/or the database server are gettign overloaded and the connection is droping out or is refused for a short time. That gives you the database error as the website can’t connect to the database. To fix this, you’ll need to talk to your hosting company as they are the only ones that can do anything about hardware issues like this.
    – There are also many threads on this topic on these forums: https://www.ads-software.com/search/Error+establishing+a+database+connection?forums=1

    Thread Starter jpmerx

    (@jpmerx)

    Thank you for your answer.

    Indeed on my side the issue is intermittent. I’m desperately trying to talk to Dreamhost with Lifechat… Not possible up to now.

    I have a ticket opened since 12 hours… No answer.

    What is your view on Dreamhost customer service level?

    Moderator t-p

    (@t-p)

    the issue is intermittent.

    – If the error is intermittent then it’s your server. What’s happening is that the web server and/or the database server are getting overloaded and the connection is drooping out or is refused for a short time. That gives you the database error as the website can’t connect to the database. To fix this, you’ll need to talk to your hosting company as they are the only ones that can do anything about hardware issues like this.

    What is your view on Dreamhost customer service level?

    Sorry. No idea.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error establishing a database connection – Dreamhost’ is closed to new replies.