#42546 [Bgs]: Php connect to mySQL
| From: | hholzgra@php.net | Date: | Sat, 08 Sep 2007 19:16:51 +0000 |
| Subject: | #42546 [Bgs]: Php connect to mySQL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-117313@lists.php.net to get a copy of this message | ||
ID: 42546
Updated by: hholzgra@php.net
Reported By: hwu475 at yahoo dot com
Status: Bogus
Bug Type: *Configuration Issues
Operating System: Win XP home
PHP Version: 4.4.7
New Comment:
Or you can follow the instructions how to set backwards compatible
mysql passwords as documented in the manual page quoted above.
Previous Comments:
------------------------------------------------------------------------
[2007-09-08 19:11:42] hholzgra@php.net
see http://dev.mysql.com/doc/refman/4.1/en/password-hashing.html
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-04 18:13:48] hwu475 at yahoo dot com
Description:
------------
Note:
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_config.php
<?php
$db_host = "localhost";
$db_user = "root";
$db_password = "123123";
$db_name = "webq";
?>
temp_con.php
<?php
require($_server["DOCUMENT_ROOT"]."db_config.php");
$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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42546&edit=1