MySQL server while "reading source communication packet", system error: 111

I moved my site to godaddy server , but the SQL connection does not work even with adequate changes that worked fine before

<?php $link = mysql_connect('www.xxxxx.com', 'phpadminusername', 'phpadminpasswor'); if (!$link) { die('Could not connect: ' . mysql_error()); } /*echo 'Connected successfully';*/ echo "DB CONNECTION :<font color='green'>ACTIVE</font>"; ?> 

Error displayed

Warning: mysql_connect () [function.mysql-connect]: Lost connection to MySQL server while "reading the source communication packet", system error: 111 in / home / content / 58/9508458 / html / psychiatric / private.php on line 196 Could not connect: lost connection to MySQL server while reading initial communication packet ', system error: 111

+7
source share
2 answers

fixed by updating the hostname in the account manager specifically defined by godaddy.com .. not only the domain name

+5
source

This probably means that mySQL is only configured to query specific hosts (or hosts). You can say that MySQL only accepts packets from certain IP addresses (usually it is localhost, but it can be wider on GoDaddy - not sure, because I do not use them).

Check the connection string - in particular, the bit "www.xxxxx.com". Perhaps it should be "localhost" or a specific IP address.

+1
source

All Articles