Page 1 of 1

mysql_connect function error

Posted: Sun Dec 17, 2006 10:51 pm
by jeva39
I have this lines:

Code: Select all

14 $con = mysql_connect("localhost", "root", "xxxxx")or die('MySQL Connect Error: '.mysql_error());
15 mysql_select_db("midis"); 
16 $sql = "select tema,ritmo from temas order by tema";
But I receive this error:
mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Inetpub\wwwroot\PHP\Function_DB_mySQL.php on line 14

Please, what is the cause of this error?

Thanks...

Posted: Mon Dec 18, 2006 1:06 am
by Chris Corbyn
You need to be running the same version of MySQL locally, as what's running on the server. Your MySQL client (which PHP is using) is trying to send passwords in the wrong format for the version of MySQL on the server.

Posted: Mon Dec 18, 2006 3:20 am
by dibyendrah
Which version of MySQL client are you using ?

This might happen if your mysql client is old and can be solved by upgrading the mysql client.

Posted: Mon Dec 18, 2006 6:51 pm
by jeva39
I'm using mySql version 5.0.24 and PHP 4.4.1.

I don't test the APP in my Hosting Server. I test my APP locally in my machine using ENGINSITE Editor or NuSphere 4.5.

Thanks

Posted: Mon Dec 18, 2006 7:14 pm
by volka
Search your system for libmysql.dll
Where are these files located?

Posted: Mon Dec 18, 2006 7:27 pm
by jeva39
Ooops... Don't exists!!! What I can happen? Please, what is the correct location for this .DLL?

Posted: Mon Dec 18, 2006 7:45 pm
by volka
Then the mysql client library was compiled into php.
Take a look at http://dev.mysql.com/doc/refman/5.0/en/old-client.html

Posted: Mon Dec 18, 2006 8:39 pm
by jeva39
Sorry by my error: the LIBMYSQL.DLL really exists in C:\MySql\Bin directory.

Posted: Mon Dec 18, 2006 9:09 pm
by jeva39
Problem solved!!! Thanks very much to all...