Desmond Mpofu - 2013-10-01 00:33:31
We trying to run a MYSQL database based blog and I have problems with simple connecting to the database I created. I used PHP and when I run the site I get this error
"Warning: mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/thenalzk/public_html/conn.php on line 6
Could not connect to the database; Lost connection to MySQL server at 'reading initial communication packet', system error: 111"
This comes from this php file
<?php
define('SQL_HOST','http://www.certainsitename.co.za');
define('SQL_USER','user');
define('SQL_PASS','password');
define('SQL_DB','dbase1');
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
or die('Could not connect to the database; ' . mysql_error());
mysql_select_db(SQL_DB, $conn)
or die('Could not select database; ' . mysql_error());
?>
Please may you direct me as to what could be the problem? It runs perfectly on my local server.
Regards
Desmond