mysql problem with apache and php

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

mysql problem with apache and php

Post by itsmani1 »

Please see this and help me ...

thanks in advance..

Code: Select all

<?

	mysql_connect("localhost","root","root") or die("Sorry Please ..........");
	mysql_select_db("test");	
	$re = mysql_query("select * from test1") or die(mysql_error());
	while($ro = mysql_fetch_object($re))
	{
		echo $ro->name;
		echo "<BR>";
	}
	
?>
Result :
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Server\Apache2\htdocs\test.php on line 10
Sorry Please ..........
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Just do a websearch for the error you got (leaving the 'specific bits' suchs as filename, line number etc out), and see that it's a common problem...

A simple websearch returns enough useful sites....
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

9 out of 10 times this has to do with the mysql client api version you are using. This happens almost every time you upgrade from 4.0 to 4.1+. As of MySQL 4.1 there was a new password authentication algorithm used that increased the character length from 16 bits to 32 bits. Using an old password with the new system throws that error 100% of the time unless you edit your my.conf file in the [mysqld] section.

Search these forums for your error message. I have answered this question several times in the past, complete with the exact mods you need to make to the my.conf file.
Post Reply