• Resolved deadtreeme

    (@deadtreeme)


    I’m trying to install WordPress on one of our local server and I’m getting the ‘Error establishing a database connection’ screen. I can sign on to MySQL on the command line with the same credentials, so I know that MySQL is running and the user and password are OK.

    Is there any way to get a more verbose error message to help me track down the problem?

Viewing 11 replies - 16 through 26 (of 26 total)
  • I had the same problem as above, so I tried the old password bit and that didn’t work.

    I was migrating my wordpress install from another computer so I knew everything should work properly, but for some reason it refused to work. I upgrade from a 4.1.x version of MySQL to 5.0.67.

    I reviewed settings in the wp_config.php file and decided to change the DB_HOST value from ‘localhost’ to ‘127.0.0.1’ and voila! It worked immediately.

    I don’t know if it’s bad from to use the ip address, but it seemed to work.
    I have no clue why it didn’t work with localhost list as db host. Maybe someone smarter can post why this is the case. Anyway, glad it’s working now. Hopefully this helps someone else.

    After pulling some hair out for an hour I thought I would pass on a solution I found.

    I tried pretty much everything up here, but nothing worked.

    For those using cPanel, this might be something good to know.

    I tried to name my database using underscores like ‘my_wordpress’ well Cpanel took the name fine but showed it as ‘user_mywordpress’ which is fine so I plugged that in thinking it stripped the _ (underscores) from the string. Turns out it didn’t. As soon as I deleted that database and created a new one called ‘mywordpress’ and created a new user and password (for good measure) and assigned it to the new database, it worked. I am running MySQL 5.0.51a

    Hope it helps someone. I actually was inspired to check the database name when i visited this link:

    Yeah, I was 1 of the 1% and needed to enter the IP as ‘localhost’ didn’t work!!… maybe that “local host should work for 99%” should be changed to 98.9% ?? … great forum by the way .. problem solved in less than 5 minutes!!

    azul007

    (@azul007)

    i wrote every line right.
    but it just doesnt work at all

    nicefella

    (@nicefella)

    try adding the default port number that you set in php.ini next to the host address field like
    127.0.0.1:3306 or :3307.

    this worked fine for me.

    very good, i also have this problem

    Hey all

    I have been encountering the same error message and have tried all of the above to no avail.. I am trying to move the site from an existing install to a host using cPanel and PHPmyadmin. The server is running:
    PHP version 5.2.6
    MySQL version 4.1.22-standard-log

    I have tried doing a fresh install also to no avail, just getting the error when attempting to go to the install.php page. So its clearly having some toubles with the usr / pwd as mentioned above…

    There are other sites running on this server but not WordPress, so im trying to install into a sub directory. When creating the database and usr it auto adds a prefix, example: I enter database name ‘database01’ it creates ‘owner_database01’ the same with the username…
    Is this normal? I have tried using both variations in the wp-config.php file and neither work…

    Any helpp would be very useful.
    thanks

    Hello, I am getting this same message and I see the problem. My password doesn’t match in wp-config.php. How do I change it? Or do I make the database password match what is in wp-config.php?

    I have got the Error establishing a database connection message since Saturday. Didn′t touch any files. My blog was working since I upgraded to 2.7 a few days after the release so this error comes as a surprise. I have done many posts since then. I checked my config file and is okay. I haven′t received any messages from my hosting provider… I am lost with this problem and need some help. I don′t know how to use prompt command neither have cpanel… So if somebody can give me some help like for dummies I will appreciate it… Please!

    I am having the same problem as the member above. My site has been working fine until last night when I got the message Error establishing a database connection. I have no idea why this happened. I need help, please.

    I realize this is an old thread but I’m having trouble with this same issue and maybe someone can help. Have followed all the suggestions here with no luck. I tried creating both a mySQL4 and a mySQL5 user and I still have the same problem. Have checked and rechecked (and rechecked) the relevant lines in the wp-config file. Still no luck.

    Question: I’m confused about how to use the OLD_PASSWORD trick mentioned above since I don’t have the ability to go to my web host and find an MySQL> prompt. It doesn’t work that way. I can create a mySQL user and a database, but there’s no opportunity to do anything with it through the webhost. How do you do that?

    Sorry for being so thick, but I’ve just spent hours going through the forums and I must be misunderstanding something. Where does the SET PASSWORD FOR some_user@some_host = OLD_PASSWORD(‘your_old password_here’); text go??

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘The Infamous ‘Error establishing a database connection’’ is closed to new replies.