Hello Mr. Kudose,
I am very glade to c ur reply. I have defined below what are all the error's I get. Please have a look and give me some solution.
$host = "abc.net.in";
$root = "some_username";
$pswd = "some_password";
$dbnm = "my_database_name";
$DB_connect = mysql_connect($host, $root, $pswd);
if(!$DB_connect){
die('Error in Database connection');
}
mysql_select_db($dbnm, $DB_connect);
While I am using the above code I am getting this below error
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/project-folder/public_html/folder/file.php on line 2.... (i.e) I am getting error on this below line
$DB_connect = mysql_connect($host, $root, $pswd);
But I haven't used any port in this.
While I am using default port '3306' as I shown below also I am getting same above error.
$host = "abc.net.in";
$port = "3306";
$root = "some_username";
$pswd = "some_password";
$dbnm = "my_database_name";
$DB_connect = mysql_connect("$host:$port", $root, $pswd);
if(!$DB_connect){
die('Error in Database connection');
}
mysql_select_db($dbnm, $DB_connect);
What is system error: 111?