error on remote connection to mysql

Posted by Ahmet vardar on Server Fault See other posts from Server Fault or by Ahmet vardar
Published on 2011-01-17T10:36:53Z Indexed on 2011/01/17 10:54 UTC
Read the original article Hit count: 282

Filed under:
|

Hi,

I ve been trying to connect my dedicated server mysql db from my computers localhost my code is here;

$dbhost = 'domain.com';
$dbuser = 'username';
$dbpass = 'pass';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect: ' . mysql_error());

$dbname = 'dbname';
mysql_select_db($dbname);

I get that error

Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 61

Dedicated server is Linux centos 64 bit, php 3.2.4, mysql 5.1.54

Is there any workaround that ?

Thanks

© Server Fault or respective owner

Related posts about mysql

Related posts about remote-connection