title: Lost connection to MySQL server during query - PHP, MySQL
body: <p>I have this php code, the files are hosted on another server and db else where</p>
  
  <pre><code>$hostname_xxx = "xxxdb.db.234141.mysqldbhosted.com";
  $database_xxx = "xx11xx";
  $username_xxx = "xx11xx";
  $password_xxx = "xx332211xx";
  $shasown = mysql_pconnect($hostname_xxx, $username_xxx, $password_xxx) or trigger_error(mysql_error(),E_USER_ERROR); 
  
  
  $your_ip = $_SERVER['REMOTE_ADDR'];
  
  
  echo $your_ip;
  
  
  
  $insertSQL1 = "INSERT INTO  table (users_ip) VALUES ('$your_ip)";
  mysql_select_db($database_xxx, $xxx);
  $Result21 = mysql_query($insertSQL1, $xxx) or die(mysql_error());
  </code></pre>
  
  <p><strong>The error I am getting is</strong></p>
  
  <p>Warning: mysql_pconnect() [function.mysql-pconnect]: Lost connection to MySQL server during query in /domains/4444.com/html/55.php on line 8</p>
  
  <p>Fatal error: Lost connection to MySQL server during query in /domains/4444.com/html/55.php on line 8</p>
  
  <p>Thanks
  Jean</p>