Click to See Complete Forum and Search --> : Mysql/php connection
osemollie
03-08-2006, 09:37 AM
Dear colleagues,
I have installed mysql and php on my machine which I want to use as a development server. When I run mysql from the command prompt, I access the database, BUT when I try connecting through php, i get an error:-
"mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client"
What could be the problem?
bokeh
03-08-2006, 10:34 AM
Using PHP 4.x.x with MySQL 4.1.x and later. Should be PHP5.
chazzy
03-08-2006, 03:15 PM
Using PHP 4.x.x with MySQL 4.1.x and later. Should be PHP5.
I honestly don't see how the php or mysql version is relevant.
The problem here is that it would seem you installed mysql and php yourself, but you never install the mysql client application on the server as well.
bokeh
03-08-2006, 04:13 PM
I honestly don't see how the php or mysql version is relevant.
The problem here is that it would seem you installed mysql and php yourself, but you never install the mysql client application on the server as well.Ok but I can assure you that it is. It's a well known problem. I found the following in the manual:
Some versions of PHP do not support the new longer passwords used by MySQL 4.1 and later...
"Client does not support authentication protocol requested by server; consider upgrading MySQL client"...
Upgrade to a newer PHP that supports the longer MySQL passwords.
The only way to get it to work is as root with no password.
chazzy
03-08-2006, 05:49 PM
I've seen that error tons of times. You can actually search the forums for the error text and you'll find that 75% of the answers are "install the client binaries and try again" other 25% is out of date php
but really, mysql 4.1 is how old? 2 years? i would think that most people download php 4.4.x or 5.x now a days.
bokeh
03-09-2006, 02:33 AM
mysql 4.1 is how old? 2 years? i would think that most people download php 4.4.x or 5.x now a days.I don't know. PHP4.3.9 suffered from this problem and that's about a year old.
The problem comes from the apache/php/mysql packages which for sometime were miss matched. They worked in the default mode (root, no password) but not otherwise).