WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection! (30 posts)

  1. javajive
    Member
    Posted 10 years ago #

    I've been using wp without problems for a few weeks now. Last night I went into the admin panel, and 'options' and changed the password. Today I was able to view the site without trouble. Tonight my whole site is down (at least on my end) are you able to pull it up? Do you know why this may be happening and how to resolve it?
    Thanks for your help in advance.
    http://www.thejavajive.com/blog

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    If you did not change the details in wp-config.php, then it's probably a host error / server maintenance.
    Chuck them an email :)

  3. javajive
    Member
    Posted 10 years ago #

    Podz - was I supposed to change the details in the wp-config.php file as well as through the 'option' screen? Are you able to view my site? It won't even pull up here.

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Noo...wp-config.php should be left alone once it's working.
    There's no password in wp options you can have changed which will have brought this about.
    Send your host the email.

  5. anant_27
    Member
    Posted 10 years ago #

    I am having the same problem. It just started. I don't know what has gone wrong. Could it be due to some spammer ??

  6. adeydas4
    Member
    Posted 10 years ago #

    It cannot connect to the database. Did you change wp-config.php??? Here's the error, its is giving:

    Error establishing a database connection! This probably means that the connection information in your wp-config.php file is incorrect. Double check it and try again.
    * Are you sure you have the correct user/password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?
    WordPress Support Forums

  7. Arisa
    Member
    Posted 10 years ago #

    Sorry to dredge this up from the deep, but, I'm experiencing the same problem.

    I have not touched the wp-config file. I haven't even thought about it. But since installation (I have AceNet as my host, they have the latest version. I click a button, it installs. No muss, no fuss, no errors -- til now) I've been hit with the occasional little "Error establishing a database connection!" message whenever I try to view comments, login, or really do anything with my blog.

    Before it was the occasional thing, but now it's pretty constant for me, and I'm not sure what to do. It's more annoying than anything else, though I am afraid it could be a hint of a larger problem that I'm not yet aware of. Usually reloading the page fixes the problem, but now that doesn't work as well.

    Help is much appreciated. ^_^

  8. Mark (podz)
    Support Maven
    Posted 10 years ago #

    This is a hosting problem - fire an email at your host / their support or otherwise bug them about their databases.

    Also, while you can, take a database backup.

  9. Arisa
    Member
    Posted 10 years ago #

    Thanks, Podz. ^_^

    I'll do just that. I appreciate the quick response!

  10. GregK
    Member
    Posted 9 years ago #

    I'm having this problem also -- again. My blog will run fine for a long time, I won't change a thing, and then suddenly I'll get the "error establishing a database connection" message from time to time. (Not all the time.)

    I'm pretty convinced it's a problem with the host, but when I ask them to check on it they just look at my blog and (of course) it works for them, so they say everything is fine.

    So what, specifically, should I ask the hosting company to do when this happens? Restart the box? Restart MySQL? Specific details would be much appreciated.

    Thanks.

  11. vkaryl
    Member
    Posted 9 years ago #

    Ask them to access your blog from a normal browser window instead of through their admin interface. What my host has done in the past is have one of their support staff load IE and Firefox in a "normal" machine, then attempt to be a "normal user" accessing the blog, registering, etc.

    Ask them to try this sort of "look over"....

  12. GregK
    Member
    Posted 9 years ago #

    vkaryl, thanks for the info, but if the problem is intermittent (as it has been), they might still see the page and conclude that all is okay. I'm wondering if I need to ask them to do something specific, like restart MySQL services on the box, or something like that.

  13. vkaryl
    Member
    Posted 9 years ago #

    Possible, but I don't have any experience of that myself. The single time I had this problem (months ago now), my host support person spent several days playing with access etc. When heesh got the same thing I was seeing (which I have to say was NOT the same as your situation!), heesh knew what needed to be fixed, and they fixed it. End of my story.

    If they're not able to spend that sort of time and effort, obviously it creates problems for you, since no matter how many times you input a trouble ticket, they may never see the problem.

    Personally, I feel that if your blog is working fine for long periods of time, and then suddenly (with no changes on your end) you start having this again, it MUST be something your host is doing. At this point, I'd simply email them and say, "Whatever you just did to my account/the server my files are on, PLEASE UNDO IT." I've done that too, though not with my current host.

  14. If the problem is intermittent, then it is probably a server problem. More than likely, their MySQL server is unstable and crashing frequently.

  15. hillman
    Member
    Posted 8 years ago #

    I have php5.0.3 and my sql 5.0 I am receiving error

    Your PHP installation appears to be missing the MySQL which is required for WordPress

    When I install PHP 4.4.2 and Mysql 5.0 it give me error

    Error establishing a database connection
    Please help me and mail me it's urgent

  16. moshu
    Member
    Posted 8 years ago #

    We don't do email support. You will have to check back.

    1. Search for the error message you quoted (missing MySQL) - it has a fix by making PHP to "talk" to MySQL.
    2. If there is error of DB connection - it means one of the 4 pieces of info in the config file is not correct. Actually there are two kind of error messages you can get, so which one is yours?

  17. stuartj
    Member
    Posted 8 years ago #

    Hi there,

    New to WordPress so please bear with me :(

    Have followed the excellent WordPress tutorial on MacZealot - http://maczealots.com/tutorials/wordpress - for installing WordPress locally on my Mac.

    I'm fine until I try and start the WordPress installer, when I get the following:

    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 The.Hub. 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?

    I'm pretty sure I have ther right U&P (this is the wp_config file):
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'root'); // Your MySQL username
    define('DB_PASSWORD', 'shaihulud'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    Methinks its a mysql thing (of some flavour). Was patient and glad for the challenge for about 2 hours,. Am now hot, bored and extremely irritated!

    Can anyone help?

    Housekeeping: I installed mySQL version 4.0.24 onto a mac boo pro, and the PHP came natively

    Thanks in advance for your help

  18. DokumentAMarble
    Member
    Posted 8 years ago #

    You get that same error when going to my website http://www.dokumentamarble.com . It has been down for about a week now due to this problem. I have contacted my webhost and they have been trying (unsuccessfully) to get help. Any advice or help is welcomed alot. He(the host) says it isnt his fault. One thing i noticed was that when i looked in my wp-config.php file the passwords and usernames wern't plain, they had _wrdp1' after the usernames. i changed that but to no avail. Suggestions please.

    .dok

  19. DokumentAMarble
    Member
    Posted 8 years ago #

    I did change my wp-config.phpHere is my wp-config.php if it helps any. The ***** will replace username and password....duh. I have afeeling that it might have been down then i changed it being dumb, and its back or will be, but my config file will be at fault. is there anyway to reset it or can somebody show me theirs so i know how t o fix it?

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', '*****_wrdp1'); // The name of the database
    define('DB_USER', '*****_wrdp1'); // Your MySQL username
    define('DB_PASSWORD', '*****'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    /* That's all, stop editing! Happy blogging.

    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    Not that I am saying that this is the problem. It could be something else. I dont know, thats why I'm here. Thanks again

    .dok

  20. DokumentAMarble
    Member
    Posted 8 years ago #

    I have changed my config back to what i think it was, and i have tried changing it to other things. it didnt work. if anybody has an idea, ill take them. thanks

    .dok

  21. johnoz
    Member
    Posted 8 years ago #

    stuartj -- for a local mac install try

    define('DB_NAME', 'The name of the database')
    define('DB_USER', '')(leave empty)
    define('DB_PASSWORD', '')(leave empty)
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    This works for me

  22. DokumentAMarble
    Member
    Posted 8 years ago #

    thanks, alot. That did the trick.

  23. mdawson9
    Member
    Posted 8 years ago #

    I'm having this same problem for my site, http://www.mybaryourbar.com. help! I'm new to wordpress and have no idea where to start. I haven't changed a thing in the config file and have kept the username and password the same. i don't know enough to even mess around with that stuff yet. what is the first step to get this fixed?

  24. frat001
    Member
    Posted 8 years ago #

    Hi,

    I am having the same problem. I also noticed that the database user no longer exists so I think there has to be some security hole somewhere.

    I used fantastico script to install wp 2.0.4 and the config file has 755 CHMOD set by default.

    It is a weird thing, last time it happened all my data base was deleted, this time only the user. This is the reason I think this is a security issue.

    Please someone give me some advice,

    Tony

  25. Chris_K
    Member
    Posted 8 years ago #

    Frat - you already started your very own topic. Let's not get all scattered, ok?

    http://wordpress.org/support/topic/94659?replies=2

  26. sayhar
    Member
    Posted 8 years ago #

    so I'm a newby blogger, new to this poetry.
    and right now I don't even remember my login password
    and seem to keep e-mailing myself off my blog for support
    so I'm here...

    I'd like to find the password that's connected to my admin login, of course the email my friend set me up with is not correct, so my new password gets sent to a non existing email!

    any suggestions?
    cheers,
    sayhar (at) hotmail.com
    http://www.risehealing.com

  27. MajorD
    Member
    Posted 8 years ago #

    After pulling my hair out after moving my site from a crashed server to a new server, and upgrading many of the site's components, I discovered that MySQL has made changes to their password schema. This is a big deal and I'm a little pissed at them since the MySQL programs I purchased previously will not work with this new password schema.

    Anyhow, I found a page that discusses how to make changes to the oldstyle password which upgrades it to a new style password (to make a long story short).

    From this page: http://dev.mysql.com/doc/refman/5.0/en/old-client.html
    From a MySql command prompt type the following info where 'newpwd' is replaced with the new password you want to use.

    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user';

    mysql> FLUSH PRIVILEGES;

    Hope this helps some of you...

  28. MajorD
    Member
    Posted 8 years ago #

    Also, this allows you to connect to your database with PHPMyAdmin and other clients.

  29. fullframe
    Member
    Posted 8 years ago #

    Hello,

    When the connection to database is not possible, we get a message. But I should like in this case to redirect towards another html page of my site. Is it possible ? How could i do ?

    Regards,

    pat

  30. britneyalves
    Member
    Posted 8 years ago #

    I've been using WordPress for over a year and never had a problem-- and suddenly I can't connect to the database, it says.

    Where do I go to fix this? Also, where is this database even stored?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags