MySQL: Client does not support authentication protocol

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySQL: Client does not support authentication protocol

Postby PeterYpenburg » 25. June 2008 20:48

Hi There,

Previously I had to go through the pain of installing Apache, PHP and MySQL manually on windows but now XAMPP is the answer.

It all installed fine, Apache and MySQL running, WOW.

Just one problem, after the install I am now trying to run my apps, it all worked before but now as soon as I make a DB call I get the following error:

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\xampp\htdocs\LithoEstimation\includes\functions.php on line 67
Client does not support authentication protocol requested by server; consider upgrading MySQL client

My line 67 is ...
mysql_connect($DBHost, $DBUser, $DBPass) or die(mysql_error());

If I use PHPMyAdmin I can access my databases, no problem.

with the previous version of MySQL I had installed this worked, my previous version was mysql-4.0.18-win.

I do not know how to fix this or where to start looking, the problem may be a PHP setting. Can some one please help, thanks.
Peter Ypenburg

Life is an adventure,
dream it like you are never going to die,
live it like you are going to die today.
PeterYpenburg
 
Posts: 3
Joined: 25. June 2008 20:07
Location: Johannesburg, South Africa

Postby sari42 » 26. June 2008 20:26

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server;
normally using "oldpassword" solves that problem, see http://dev.mysql.com/doc/refman/5.0/en/old-client.html
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby PeterYpenburg » 26. June 2008 21:39

Hi There,

Thanks for the link. If I understand it correctly does this mean that the new installation of MySQL does not know what the password of the previously installed MySQL was?

The link posted says:
To solve this problem, you should use one of the following approaches:
*Upgrade all client programs to use a 4.1.1 or newer client library.

Is there a way to check what version of MySQL is installed by XAMPP?

Thanks.
Peter Ypenburg

Life is an adventure,
dream it like you are never going to die,
live it like you are going to die today.
PeterYpenburg
 
Posts: 3
Joined: 25. June 2008 20:07
Location: Johannesburg, South Africa

Postby sari42 » 27. June 2008 10:00

>If I understand it correctly does this mean that the new installation of MySQL does
>not know what the password of the previously installed MySQL was?
newer versions just use a more secure hashing algorithm.

>Is there a way to check what version of MySQL is installed by XAMPP?
it is displayed when you fire up phpmyadmin ...

I'd search all disks for libmysql.dll, maybe there is an older version in the search path which is used instead of the newer one that xampp provides. I always copy the latest version into the systems32 folder (just to be sure).
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby Wiedmann » 27. June 2008 10:47

Previously I had to go through the pain of installing Apache, PHP and MySQL manually on windows but now XAMPP is the answer.

Are you using your old database (from the previous install) with XAMPP?

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Are you using PHP4?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby PeterYpenburg » 27. June 2008 21:19

Hi There,

XAMPP is using PHP 4.4.8 and MySQL 5.0.51a.

My previous version of MySQL was 4.0.18. I uninstalled my previous setup of Apache, MySQL and PHP. My previous MySQL was installed in c:\MySQL.

After uninstalling the lot I installed XAMPP, copied the contents of C:\Program Files\Apache Group\Apache2\htdocs to C:\Program Files\xampp\htdocs and copied my databases from C:\mysql\data to C:\Program Files\xampp\mysql\data.

No change in code, now when I execute
mysql_connect($DBHost, $DB, $DBPass) or die(mysql_error());

I get the error.

I did search for libmysql.dll and made sure the one in my systems32 folder is the same as the one used by XAMPP, that did not sort out the problem.

Not sure what to do next, any ideas?
Peter Ypenburg

Life is an adventure,
dream it like you are never going to die,
live it like you are going to die today.
PeterYpenburg
 
Posts: 3
Joined: 25. June 2008 20:07
Location: Johannesburg, South Africa

Postby Wiedmann » 27. June 2008 21:46

XAMPP is using PHP 4.4.8

Can't you use PHP5?

and copied my databases from C:\mysql\data to C:\Program Files\xampp\mysql\data.

You have also copied the database "C:\mysql\data\mysql"?
(--> not a good idea in a step from 4.0 to 5.0)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 119 guests