|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42546 Php connect to mySQL
Submitted: 2007-09-04 18:13 UTC Modified: 2007-09-08 19:16 UTC
From: hwu475 at yahoo dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.4.7 OS: Win XP home
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: hwu475 at yahoo dot com
New email:
PHP Version: OS:


 [2007-09-04 18:13 UTC] hwu475 at yahoo dot com

I am not able to connect php to mySQL and please see below error messages. If  I am not going to change versions of my servers, can I connect (using my ?php? scripts) to mySQl databases?

I am current using:

Apache 1.3.37
MySQL 4.1.22
Php 4.4.7

Thank you,

Henry from Oregon USA

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:\program files\apache group\apache\htdocs\temp_con.php on line 3

error connectingClient does not support authentication protocol requested by server; consider upgrading MySQL client

Reproduce code:
Here are my php scripts (db_config.php,   temp_con.php) :


$db_host = "localhost";
$db_user = "root";
$db_password = "123123";
$db_name = "webq";


$connection = mysql_connect($db_host, $db_user, $db_password) or die("error connecting");
print "connection made";

Expected result:
"connection made"

Actual result:
error (see above)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-08 19:11 UTC]

you can stick with the versions you are running, but you need
to recompile php against the client libs from the installed
MySQL version instead of using the bundled library then:

  configure --with-mysql=/path/to/mysql
 [2007-09-08 19:16 UTC]
Or you can follow the instructions how to set backwards compatible mysql passwords as documented in the manual page quoted above.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Sep 30 22:05:55 2022 UTC