WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Continually getting "Error establishing a database connection" message (12 posts)

  1. PatLagreid
    Member
    Posted 4 years ago #

    Hello -

    I've found myself getting the "Error establishing a database connection" message all day today on one of my website that is hosted on 1and1.com.

    I thought there might have been a configuration error, so I went to mySQL administration and verified everything, and then changed the password for good measure. I was able to get back in with no problem and do some work, but then in as little as 15 minutes I would get the same error.

    I'm on the latest version of WordPress and using SQL 5.0, and using 1and1.com as my server.

    I'm really confused as to what might be causing this -- mainly because it seems to work for a while and then becomes unusable.

    Also, when trying to access phpMyAdmin via 1and1's admin site, I'm getting an access denied message saying:

    "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server."

    Thanks for any and all help you can provide!

  2. pzul
    Member
    Posted 4 years ago #

    I'm Having the same Issue, also hosted on 1and1. Have called them 3 times today and still no updates.

  3. PatLagreid
    Member
    Posted 4 years ago #

    Quick update to my problem -- the window seems to be less than 10 minutes before I get the error messages again, and there doesn't seem to be anything in particular causing it. I'd been working on a post and it happened, and I was poking around the dashboard this last time.

    Could there be something corrupting my database? If so, could I move all the data over to a new one?

  4. pzul
    Member
    Posted 4 years ago #

    Hi Pat I did what you are doing and changed the password got in and made backup of the db. I went through and cleaned out any oversized tabled (mine was from podpress) Then i ran mysqlcheck on the database and that seems to have fixed it. not sure if it was something on their end or mine. but i appear to be back up and running.

    WHich Database server was that db hosted one? Mine was on db1830.perfora.net all other DBs on different servers were fine. Hope this helps.

  5. elvisszhang
    Member
    Posted 4 years ago #

    please check the field value of [siteurl] in table [wp_options],
    it should be your accurate site URL.

    also you can execute sql as following (replace YOUR_SITE_URL as your site url):

    update wp_options set option_value='http://YOUR_SITE_URL' where option_name='siteurl'";

  6. Shane G.
    Member
    Posted 4 years ago #

    Hi,

    Check with these options:

    - Username and password information in your wp-config.php file is incorrect. Please check with PHPMyAdmin and correct it or reset it. Also make necessary changes in wp-config.php file.

    - Make sure that you have typed correct host name in wp-config.php file.

    - Your hosting service provider’s database server is down. Hence, take a support from your hosting service provider.

    Thanks,

    Shane G.

  7. 40cooper
    Member
    Posted 4 years ago #

    I'm having this same problem with playstation4guru.com. It'll be fine for a time, then I'll get "Error establishing database connection" message. I've also noticed (unrelated?) that it's often running painfully slow, front end and admin as well. I checked my wp-config a couple times, I've checked the wp-options table as well. I'm getting a few thousand organic visitors a month right now so this error is a real problem. Any help would great.

    Jason

  8. colinwiseman
    Member
    Posted 4 years ago #

    Am also getting this error now on a regular basis. I have increased the maximum allowed conncetions in my.cnf to 500 and have moved a whole bunch of images off the server to a CDN (well one of my other servers) to lighten the load on the server incase it is just the memory that is all getting used up and it cannot physically create anything new.

    But they are still appear, and about 10 times already today. Now I know it's not the wordpress config as the site works instantly afterwards, but someone above said something about the PHPMyAdmin - could that be affecting it - as we are having some permissions issues with the PHPMyAdmin user for some unknown reason.

    Cheers

  9. Angie23
    Member
    Posted 4 years ago #

    I keep getting these messages as well.

    My site was running fine for weeks now .
    Now for the last three days ,just after I work on wordpress, f.e. I check broken links,make a post,etc.
    all of the sudden I get

    "error establishing database connection"
    etc.
    which leaves me unable to make more posts and my site is blank with only a http: 500 error message .
    This lasts from a few minutes to up an hour .

    What's going on here ?
    My blog is hosted with hostpapa and fantastico.

  10. kewalter
    Member
    Posted 3 years ago #

    I'm having the same problem on a self hosted site. I don't see any apache errors in the log that would cause it. The only thing that works for me is to restart the whole machine.

  11. katebutler
    Member
    Posted 3 years ago #

    I'm getting "Error establishing a database connection" too.

    Is there a non-techy explanation about how to resolve this?

  12. esmi
    Forum Moderator
    Posted 3 years ago #

    @kewalter & katebutler: Please post a new topic.

Topic Closed

This topic has been closed to new replies.

About this Topic