|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
14 - 8 = ?
Subscribe to this entry?

 [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: Wed Oct 05 14:05:52 2022 UTC