Need Help!!! WordPress can not connect to database (6 posts)

  1. sunfirenet
    Posted 9 years ago #

    I am running this on my own windows 2003 server. I have installed Mysql, PHP, and wordpress.

    I have tested my PHP, this works fine. I can log in to mysql database using mysql admin software, shows it is running. I have set all of the proper information in the wp-config.php.

    But when i go to my url to do the install.php i keep getting wordpress can not connect to my database.

    I have read forum after forum and tried everything. Can anyone help me, i would be so appreciative.


  2. resiny
    Posted 9 years ago #


  3. Chris_K
    Posted 9 years ago #

    You probably want to first make sure/confirm that your PHP can talk to mysql before . As I recall from some experimenting last year, there are some wrinkles when doing this on Windows servers.

    Have you installed phpMyAdmin? If so, can IT connect? If not, some googling should turn up what you need to do.

  4. sunfirenet
    Posted 9 years ago #

    I am actually using the mysql administrator gui. Which shows that mysql server is running. I can log in thru that into the wordpress database that i have created.

  5. Chris_K
    Posted 9 years ago #

    I have no clue what the "mysql administrator gui" is -- is it using PHP to connect to the database and running in a web browser?

    If so, groovy, that's working.

    If not, then see my earlier post (I was suggesting phpMyAdmin simply because it is a flexible PHP app to use to try and connect to MySQL).

  6. trousers
    Posted 9 years ago #

    It is likely that you are running into a conflict with password hashing. If you're using MySQL 5, it employs a password hashing algorithm completely different from previous versions. To find out if this is the problem, open wp-includes/wp-db.php. On line 43, you will see this text:

    $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);

    Take out the "@" as this supresses errors and retry the installation. If you are experiencing the password hashing issue, you will see the following warning:

    Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in ...

    If so, then you've found the problem. Go ahead and add the "@" back into line 43 and follow the MySQL instructions for fixing this problem. They are located here:


    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic