"Client does not support authentication protocol ..."

"Client does not support authentication protocol ..."

am 19.12.2006 02:36:56 von clb

I am noob, stuck here. I took this frag from the docs:

$link = mysql_connect('localhost', 'clb', 'secret');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

When I run it I get:

PHP Warning: mysql_connect(): Client does not support
authentication protocol requested by server; consider
upgrading MySQL client in /home/clb/PHP/openmysql.php on line
3
Could not connect: Client does not support authentication
protocol requested by server; consider upgrading MySQL client

Docs suggest difference in hash but I don't get it (PHP 4.4 CLI, MySQL
4.1).
This must be an obvious problem but I'm out of ideas. Please help.

Re: "Client does not support authentication protocol ..."

am 20.12.2006 01:46:53 von clb

Okay, I think I found something: I did a PHP -i and, under the MySQL
section it says "Client API version 3.23.49. So now I will try creating a
new user with OLD_PASSWORD and see if that works. Stay tuned.

clb wrote:

> I am noob, stuck here. I took this frag from the docs:
>
> > $link = mysql_connect('localhost', 'clb', 'secret');
> if (!$link) {
> die('Could not connect: ' . mysql_error());
> }
> echo 'Connected successfully';
> mysql_close($link);
> ?>
>
> When I run it I get:
>
> PHP Warning: mysql_connect(): Client does not support
> authentication protocol requested by server; consider
> upgrading MySQL client in /home/clb/PHP/openmysql.php on line
> 3
> Could not connect: Client does not support authentication
> protocol requested by server; consider upgrading MySQL client
>
> Docs suggest difference in hash but I don't get it (PHP 4.4 CLI, MySQL
> 4.1).
> This must be an obvious problem but I'm out of ideas. Please help.

Re: "Client does not support authentication protocol ..."

am 20.12.2006 03:00:19 von clb

Success! using the shorter hash of version 3.23 instead of longer used in 4.1
made the diff.

clb wrote:

> Okay, I think I found something: I did a PHP -i and, under the MySQL
> section it says "Client API version 3.23.49. So now I will try creating a
> new user with OLD_PASSWORD and see if that works. Stay tuned.
>
> clb wrote:
>
> > I am noob, stuck here. I took this frag from the docs:
> >
> > > > $link = mysql_connect('localhost', 'clb', 'secret');
> > if (!$link) {
> > die('Could not connect: ' . mysql_error());
> > }
> > echo 'Connected successfully';
> > mysql_close($link);
> > ?>
> >
> > When I run it I get:
> >
> > PHP Warning: mysql_connect(): Client does not support
> > authentication protocol requested by server; consider
> > upgrading MySQL client in /home/clb/PHP/openmysql.php on line
> > 3
> > Could not connect: Client does not support authentication
> > protocol requested by server; consider upgrading MySQL client
> >
> > Docs suggest difference in hash but I don't get it (PHP 4.4 CLI, MySQL
> > 4.1).
> > This must be an obvious problem but I'm out of ideas. Please help.