Page 1 of 1

mysql problem with apache and php

Posted: Wed Jul 05, 2006 9:28 am
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 ..........

Posted: Wed Jul 05, 2006 9:38 am
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

Posted: Wed Jul 05, 2006 10:15 am
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.