#42546 [NEW]: Php connect to mySQL

From: Date: Tue, 04 Sep 2007 18:13:48 +0000
Subject: #42546 [NEW]: Php connect to mySQL
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-117118@lists.php.net to get a copy of this message
From: hwu475 at yahoo dot com Operating system: Win XP home PHP version: 4.4.7 PHP Bug Type: *Configuration Issues Bug description: Php connect to mySQL 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 bug report at http://bugs.php.net/?id=42546&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42546&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42546&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42546&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42546&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42546&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42546&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42546&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42546&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42546&r=support Expected behavior: http://bugs.php.net/fix.php?id=42546&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42546&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42546&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42546&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42546&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42546&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42546&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42546&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42546&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42546&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42546&r=mysqlcfg

« previous php.bugs (#117118) next »