Re: "mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client"
Posted by:
carlturton1974 ()
Date: January 21, 2005 12:55PM
Hi
I had the same problem. The solution I found was to download MySql admin and create the account in there. Reboot, then open the Mysql system monitor and then the MySql admin. Log into the command line client through Mysql admin using, tools -> MySql command line client. The command line then opens in whatever account you have logged into via MySql Admin. I used the following codes to test it and both work.
<?php
$username ="someName";
$password ="somePass";
$hostname ="localhost";
$db = mysql_connect($hostname, $someName, $somePass)
or die("Unable to connect to MySql");
print"connected to MySql<br>";
mysql_close($db);
?>
Also works with
<?php
$db = mysql_connect("localhost", "username", "somepass");
echo $db;
mysql_close($db);
?>
Hope this helps.