Re: PHP connect to mysql problem

From: Date: Thu, 06 Jan 2005 18:19:03 +0000
Subject: Re: PHP connect to mysql problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-38021@lists.php.net to get a copy of this message
On Wed, 5 Jan 2005 15:25:21 +0300, Tsegaye Woldegebriel <tsegaye_w@yahoo.com> wrote: > Anybody help! > I can't connect from my PHP to mysql using the following code: > $link = mysql_connect("localhost", "root", "merkato") > or die("Could not connect : " . mysql_error()); > it replies with error: > Could not connect : Client does not support authentication protocol > requested by server; consider upgrading MySQL client > It sounds like you're using the MySQL 3.x or 4.0 client to try to connect to a 4.1 MySQL server. MySQL 4.1 uses a different password encryption (as you found), and you should update the PHP MySQL client library to make it work. You can also change the password encryption on the MySQL server to make this work, although you'd be defeating a security measure in doing so. Have a look here: http://dev.mysql.com/doc/mysql/en/Old_client.html

« previous php.db (#38021) next »