monkeypaw201 Posted June 7, 2008 Share Posted June 7, 2008 I am trying to connect externally to my MySQL database, i have whitelisted % and my domain. when i try to connect i use this: <?php $con = mysql_connect("laiello.freesitespace.net","user","pass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("laiello_weather", $con); $result = mysql_query("SELECT * FROM weather WHERE icao = '$_GET[icao]'"); $row = mysql_fetch_array($result) ?> and get this error: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in page.php on line 33 i have checked the usernames, passwords, privileges and hostnames... Any suggestions? Link to comment https://forums.phpfreaks.com/topic/109138-connection-errors-lost-connection-to-mysql-server/ Share on other sites More sharing options...
aseaofflames Posted June 7, 2008 Share Posted June 7, 2008 not quite sure but try mysql_pconnect in stead of mysql_connect Link to comment https://forums.phpfreaks.com/topic/109138-connection-errors-lost-connection-to-mysql-server/#findComment-559834 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.