MySQL Forums
Forum List  »  PHP

Re: unable to connect to mysql on localhost, OS used WINDOWS XP
Posted by: sam v
Date: June 06, 2007 09:57AM

I am trying to connect to MySQL DB using PHP

<?php
Print " Connecting ";
mysql_pconnect("localhost","root","mypassword") or die ("Unable to connect to MySQL server.");
$db = mysql_select_db("sam") or die ("Unable to select requested database.");
echo " Connected Successfully ";
?>

when i run this file http://localhost/PHP/DbConnect.php , all i am getting is

Connecting

after that nothing is displayed , not even the last echo statement

please help in finding the problem , i checked to see mysqld-nt.exe is running in the services and it is fine.

Please help me in finding the problem.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.