WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (15 posts)

  1. Beukeboom
    Member
    Posted 8 years ago #

    I'm getting a page saying "Error establishing a database connection" when I try to go either to my blog or my blog's login page. My WP blog system and files are stored on my wife's domain. I can't get around this error page. Is this something on my end that I need to address or something on the WP end that will clear up eventually?

  2. jackosh
    Member
    Posted 8 years ago #

    is it properly installed? did you accidentally change information about the DB in wp-config.php? have you recently changed your DB password and have not yet updated wp-config.php?

    or, maybe the DB is temporarily down..

  3. Beukeboom
    Member
    Posted 8 years ago #

    The blog is properly installed. It's been an ongoing blog for over 2 years now. i haven't changed any passwords recently so the wp-config.php file is still the same. Later in the day it was back up but this morning it's down again. However when I look for the files using ftp I can connect to my wife's domain. I can also access other non-blog materials via my wife's domain, just not my blog. I've asked my wife to send an email to the domain host. Any suggestions on what specifically she should ask about? And is there anything I can do on my end to check to see if it is a domain connection problem?

  4. MichaelH
    Member
    Posted 8 years ago #

    Well as jackosh suggested, it sounds like the database server is down. So asking the host why the database server is periodically down isn't a bad idea. If the problem persists, please entertain the idea of switching hosts.

    Being able to access your files via FTP, even when you can't get to your blog via a browser, is very likely. In many cases, your wordpress script files are on a different machine from the actual database server.

  5. CalMacLean
    Member
    Posted 8 years ago #

    I'm getting the same error when I try to reach the wp-admin/install.php via my domain (for the first time). It appears I've entered the correct information in the wp-config.php file, and the DB seems fine as well. What could I be doing wrong?

  6. ElijahZ
    Member
    Posted 7 years ago #

    Having the same problem. Except that the host says the DB server is working fine.

  7. moshu
    Member
    Posted 7 years ago #

    Please, don't double post!
    If the blog has been working for a while (as you stated in your other thread) and started to misbehave... never believe the host.

  8. ElijahZ
    Member
    Posted 7 years ago #

    Sorry for the double-post, moshu. This is the firs time I've _ever_ got a reply on a support forum, so I thought you had to really be annoying to get heard. Apologies. I'm following up with the host (bluehost, since WP recommended it). They're being very nice and helpful, but haven't solved the problem yet.

  9. moshu
    Member
    Posted 7 years ago #

    You didn't post till now in this forum (at least not under this nick). I didn't reply to your other post because for me it doesn't make sense to reopen a thread marked "resolved".

    If you didn't change anything (no upgrade, no new plugins, nothing) and a previously working site starts having problems, I cannot think of anything else but a hosting issue. Hosts tend to upgrade their servers' hardware and software without telling you and, usually, it is very difficult to make them to admit they screwed up something.

  10. ElijahZ
    Member
    Posted 7 years ago #

    Thought readers might be interested to know that the plugin BDRSS seems to have been the culprit. SpamKarma also seems messed up. The associated fields of the DB are broken.

    Tech support at bluehost was mystified. they tried everything they could think of, spent hours on the phone with me, and ultimately had to kick it up to the server admins.

    Anyway, things seem to be working at least well enough to fix the problem now. Beware of plugins when upgrading!

  11. wodemimayy
    Member
    Posted 7 years ago #

    So many topics on this "Error establishing a database connection"!!,I'll talk about my solution .wish it may help.I tried to change the hostname and that didn't work.
    I think it is not the problem of "double post",because i even didn't reach the first page of install progress which asks for your user name and email address.
    I'm using easyphp trying to make a test,so I search in the DB "mysql" of Mysql server and find there is a super user called root .At first i thought "define('DB_USER', 'username')" in the conf file should not mean the database user ,and I was wrong,when I finished replacing
    the db_name,db_suer and db_password i no longer receive the Error message any more and complete the installation.
    And unfortunatelly find out I'm not the 1%.hehe

    this is what the conf file is like in my case.

    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'root'); // Your MySQL username
    define('DB_PASSWORD', 'passord(of root)'); // ...and password
    define('DB_HOST', 'localhost'); //99% chance you won't need to change this value

  12. Shylmysten
    Member
    Posted 7 years ago #

    Wow - I'm having the same problem here, only my server says they had a Dos Attack today and the server completely crashed! The server is back up and running now, I can access my other webpages, ftp in, and I can even login to the MySQL database through the PHPAdmin client. However, I am still receiving the error message - any Ideas?

    Thanks

  13. javadmjm
    Member
    Posted 7 years ago #

    I have the same problem . MY DEFENITIONS are alright but I got database error !!

    BUT, wodemimayy you shouldnt use 'root' as the username. please change it. I think this is your problem! (MAYBE)

    Is this the problem of 2.2? Because the previous versin didnt have this problem.

  14. Ken Spong
    Member
    Posted 7 years ago #

    Hi folks. A newbie to wordpress, and I have a headache in this database area. Have checked the dbase settings in my host, and configured wp-config as:
    define('DB_NAME', '[database name as stated in host dbase]');// The name of the database
    define('DB_USER', '[username as stated in host dbase]');// Your MySQL username
    define('DB_PASSWORD', '[the password is correct]');// ...and password
    define('DB_HOST', 'localhost')[localhost is correct];// 99% chance you won't need to change this value
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    Question 1: Have I got this formatting right - or have I mucked it up completely. If it is correct, what else do I need to do. - I seem to recall having to set some permissions in wordpress.... particularly about uploading.

    Question 2: If I want to have multiple blog sets, do I need to do anything in relation to the wp-config file settings?

    Question 3: Do I need to uninstall wordpress from my site and re-do - or just click "install.php" on the website again,
    or should my best solution lay in subscribing to one of the recommended wordpress recommended sites?

    Apologies if this stuff has been travelled over before, but I could not find a solution in the forum, todate.

  15. moshu
    Member
    Posted 7 years ago #

    Well, if you have
    '[database_name]' exactly as it is here - that's wrong.
    It should be
    'database_name'

Topic Closed

This topic has been closed to new replies.

About this Topic