I want know the reason why this code is not running ?
My Wampserver IP address is 127.0.0.1:8080 or localhost:8080 !
The username is the default "root", but I changed my password to "abcd" !
<?php
/**
* @author
* @copyright 2011
*/
$con = mysql_connect('127.0.0.1:8080','root','abcd');
if (!$con) {
die('Could not connect: ' .mysql_error());
}
?>
Errors when the file is run !!! :O
Warning: mysql_connect() [function.mysql-connect]: MySQL server has gone away in C:\wamp\www\PHPgiri\4.php on line 8
Warning: mysql_connect() [function.mysql-connect]: Error while reading greeting packet. PID=7828 in C:\wamp\www\PHPgiri\4.php on line 8
Warning: mysql_connect() [function.mysql-connect]: MySQL server has gone away in C:\wamp\www\PHPgiri\4.php on line 8
Could not connect: MySQL server has gone away
Please help !