30 September 2014

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

Yup, it was informed that the above title which we access the MySQL server does not allow connections from outside. This is a classic problem experienced when an application with a separate database.

Way of overcoming it easy, just edit the mysql configuration (/etc/mysql/my.cnf), then reject (marked #) 2 configuration lines below:

skip-external-locking
bind-address = 127.0.0.1
 
become :
 
#skip-external-locking
#bind-address = 127.0.0.1

Restart mysql with this command :
 
# /etc/init.d/mysql restart

Hopefully Helpful ;-)

No comments:

Post a Comment