hello there,
I'm trying to connect to mysql using mysql_connet(). The code I use is as follows:
<?php
$link = mysql_connect('localhost', 'root', '*****');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
the error I get is:
Quote:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in c:\programfiler\apache group\Apache\htdocs\web\mysql.php on line 5
Could not connect: Can't connect to MySQL server on 'localhost' (10061)
while connecting to My SQL through windows command prompt with: mysql -h localhost root -p -- and then type the password it works. I can connect.
PHP is installed and running properly. As well as Apache.
I tried to disable my firewall, but it didn't have any effect. plz give some sug
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --