PHP4+MySQL4.1
<?php
# MyConnect.php
$hostname = "localhost";
$username = "root";
$password = "";
$connection = mysql_pconnect($hostname, $username, $password) or die ("Can't connect the database!");
if($connection)
{
echo "Connected\n";
echo "<BR>";
$status = explode(' ', mysql_stat($connection));
print_r($status);
}
mysql_close($connection);
?>
在没有给root加密码时,用root能正常登录.
一旦加上密码之后,就无法登录了.
$hostname = "localhost";
$username = "root";
$password = "19850824qxt";
错误提示是这样的:
Warning: mysql_pconnect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in D:\Server\WWW\Test\MyConnect.php on line 7
请高手指点!!!