ispCP - Board - Support
Lost connection to MySQL server at 'reading initial communication packet', system err - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Lost connection to MySQL server at 'reading initial communication packet', system err (/thread-7583.html)



Lost connection to MySQL server at 'reading initial communication packet', system err - Nomis - 08-23-2009 02:57 AM

Hi

I have recently completed a ispCP 1.0.0 installation and have loaded my website on it. However the chap who wrote it used a database for some of the data. It calls the database via a connections.php file


<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_localhost = "***.**.***.*";
$database_localhost = "allseasons";
$username_localhost = "allseasons";
$password_localhost = "scca_key";
$allseasons = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
?>

I get the following error when I try and call the page up


Warning: mysql_pconnect() [function.mysql-pconnect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/virtual/premierpumps.co.za/htdocs/Connections/allseasons.php on line 10

Fatal error: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/virtual/premierpumps.co.za/htdocs/Connections/allseasons.php on line 10


RE: Lost connection to MySQL server at 'reading initial communication packet', system err - kilburn - 08-23-2009 05:12 AM

Use "localhost" instead of the IP address when connecting to the localhost mysql instance Wink