Page 1 of 1

Help me in installing PHP5 with MySQL 5

Posted: Tue Apr 15, 2008 2:24 pm
by sj1983msh
Hi guys,

I have faced a problem with my new MySQL and PHP.
I have been using PHP5 and MySQL 4 for 3 years. But recently I decided to update my MySQL Version to 5 series.
I have removed MySQL 4 and then Installed the new version, but my PHP scripts doesn't work (can not connect to MySQL Server) for connecting to MySQL.
I tested MySQL from Command-Prompt and it works properly. But when I tried to connect via a Script, the code doesn't work and the IE shows me this warning:

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:\Inetpub\wwwroot\PHPTest\testlocalserver.php on line 12

Please tell me what should I do to install the MySQL 5 correctly.
Which kind of .DLLs or files I should have for PHP to Configure it!?
Please tell me anything you think it is necessary, because I am not a professional.
I do not know what to do! :(
Please help me.

I use these > Windows XP (SP2), IIS, PHP5

Thanks a lot.

Sincerely Yours
Saman J.

Re: Help me in installing PHP5 with MySQL 5

Posted: Wed Apr 30, 2008 11:39 am
by cooljaguar
Hello

I also have the same problem.

Could anyone help me please :roll:

Re: Help me in installing PHP5 with MySQL 5

Posted: Wed Apr 30, 2008 12:08 pm
by sj1983msh
What is your main problem with this process exactly? :(

Re: Help me in installing PHP5 with MySQL 5

Posted: Wed Apr 30, 2008 12:46 pm
by cooljaguar
Actually I installed PHP5.2.5 and MySQL 5.0.51b in Windows.

I am not able to find a way to configure PHP with MySQL,

I copied the libmysql.dll to the php folder and added that to the php.ini.

When i see the phpinfo, I am not able to find mysql in that and write a sample code like this I am not getting any error or the result

echo "Hai ";
$database="test";
$user="root";
$password="asas";
echo "<br> Before Connecting to the database ";
$conn=mysql_connect("localhost",$user,$password);
if(!$conn){
echo "<br> Could not establish the connection";
}
else{
echo "<br> connection established";
echo "Connecting to the database ";
mysql_select_db($database,$conn);
echo "Selecting the database ";
$query="select * from test";

$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
echo " in printing the rows";
echo $row[0];
echo $row[1];
echo"<br>";
}

}

Re: Help me in installing PHP5 with MySQL 5

Posted: Wed Apr 30, 2008 12:47 pm
by cooljaguar
By the way,I am using apache 2.0

Re: Help me in installing PHP5 with MySQL 5

Posted: Wed Apr 30, 2008 3:18 pm
by VladSun
If it's not a WAMP related problem, then google for old_password MySQL - that is for granting access to MySQL databases.