• I’ve seen this error posted a few times, but never a clear resolution.

    I am running my own server at home (IIS, port 8080, mySQL, PHP5)I’ve had this config set up before and working fine with WordPress but I recently formatted my server and started over for various reasons. Now it seems I can not get wordpress to connect to my mySQL server.

    mySQL is up and running. This I know. I can connect to it via a GUI interface using the wordpress log and get to the wordpress database without problem.

    When I try to load the wordpress pages though I get the following error:

    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 localhost. 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?

    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    YES I am using the proper login and pass. I have even tried the root login and pass to no avail. I have tried “localhost”, I have tried the internal IP (192.168.1.XXX) and I have tried the external IP, and even the domain name for my server. Nothing works.

    Help please!!!!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Did you try 127.0.0.1 ?

    Thread Starter homerboy

    (@homerboy)

    Yes:

    is incorrect or we can’t contact the database server at 127.0.0.1. This could mean your host’s database server is down.

    Thread Starter homerboy

    (@homerboy)

    as an added bonus I also completely turned off Windows Firewall (not that it should matter but it can’t hurt)

    You might look through this tutorial:
    https://www.tamba2.org.uk/wordpress/xampp/

    Thread Starter homerboy

    (@homerboy)

    I’ve used xampp in the past and hated it.
    I dont see why the standard installs for php5 and mysql wont work.

    Thread Starter homerboy

    (@homerboy)

    argggh lovely
    Installed XAMPP nothing worked.
    uninstalled and now I can’t even pull up the wrodpress dir on 8080

    I get an error:
    The system cannot find the path specified.

    Thread Starter homerboy

    (@homerboy)

    I will happily grant somebody access to my mysql/server to take a peek at this.

    I can send you the config.php and give you mysql login access

    Thread Starter homerboy

    (@homerboy)

    well I’ve tried everything I can think of. Gone through all the similar posts here which most seem to never be resolved. They just die out.

    Tried some suggestions on 3rd party sights and still nothing. One post suggested that WordPress did not like the password structure of mySQL5 so I revert to mysql4 with no luck. Tried:

    SET PASSWORD FOR some_user@some_host = OLD_PASSWORD(‘your_old password_here’);

    with still no luck.
    I don’t know what else to do at this point.

    Hi Homerboy,

    Try enabling the logging in MySql:
    Add the following lines in your my.ini file

    log
    log_warnings

    I get something like the following:
    Connect Client does not support authentication protocol requested by server; consider upgrading MySQL client

    I think this means that your php mysql client (libmySQL.dll)
    is too old compared with your MySql Database Server

    Check the logs (as above) and post your results
    I’m curious to see what you.

    HomerBoy:

    I forgot to mention where you can find your log files!
    They are located in the data directory of the mysql installation.

    If your using phpmyadmin, look in the server/variables
    tab/page, for the datadir entry. This will show the
    data directory location.

    The log file name will be your hostname with the extension .log

    Be sure to turn the logging off again. (They grow.)

    Since your installing locally, you can remove the password from the WordPress database user and update the wp-config.php file.

    This work around has let me proceed to the first step.
    I’ll let you know how it goes.
    -Cheers.

    My results

    Removing the password from the WordPress database user let me proceed past Step One.

    I could log on as admin with the wordpress generated password.
    I then changed the admin password on the profile page.

    Nothing choked so I’ll assume it’s working ok.

    ************************************************
    I don’t recommend this work around for public installations of WordPress.
    ************************************************

    Goodluck,
    -Cheers

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