Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Authentication Protocol for MYSQL. 1

Status
Not open for further replies.

mmilan

Programmer
Jan 22, 2002
839
GB
Just getting moving with all this PHP stuff, and for the most part I'm impressed. However, when I try and use mysql on my machine (which is Xp-pro running mysql 4.1) I get the following error...

"mysql_connect(): Client does not support authentication protocol requested by server. Consider upgrading MySQL client in f:\php stuff\gateway\sales\libs\db_connect.php on line 2"

I know my actual code is ok, because it runs fine on my mate's box, which is running mysql 3.x... My understand therefore is that the chaps at mysql have changed their protocol. Does anyone know if/where/when I get my hands on an updated version of PHP that will work with mysql 4.1?

Cheers in advance,

Martin

Ps. I'll pay my dues now and answer some questions in the Visual Basic section...
 
Ah, this is a known issue with MySQL.

You're right -- the communication protocol changed between 4.x and 4.1, and the old client software no longer works, This reason and the fact that MySQL is licensed under the GPL (PHP's licence is more restrictive) are the reasons why future versions of PHP will not bundle the MySQL communication software.

If you want PHP to use the new client libraries, you'll have to compile PHP from source.

However, if this code is to be used in a production environment, I strongly recommend that instead of upgrading PHP, you downgrade MySQL. Version 4.1 of MySQL is alpha software.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
I see...

I'll follow your advice and downgrade MySQL.

If I was crazy enough to want to recompile the source though, how would I go about that? I have Visual Studio, but I imagine there would be some level of code tweaking involved. Would I have to identify the function behind mysql_connect and write my own replacements, or is the "fixed" source already available if I'd only care to compile it?

Cheers again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top