ERROR 2013 (HY000): Lost connection to MySQL server at 'rea
發表於 : 2014-01-09 14:37:41
http://jerrywalsh.org/2009/solving-mysq ... -0130.html
Recently it became necessary to expose a MySQL instance to some customers across the internet. The MySQL daemon had previously been locked down using the my.cnf skip-networking directive. I removed this the MySQL configuration file and restarted the daemon. Sockstat showed MySQL was now listening but when I attempted to connect from a remote site I received this cryptic error message:
Nothing showed on any logs (system logs or even the MySQL error log) so I was stumped for a little bit. Also, connecting to the mysql server via its socket or localhost worked just fine. After some painful moments I finally figured out what the problem was - MySQL uses tcp wrappers and so I had to make the appropriate entry in /etc/hosts.allow:
Once added remote connections were instantly accepted and the error message went away - hurray!
Recently it became necessary to expose a MySQL instance to some customers across the internet. The MySQL daemon had previously been locked down using the my.cnf skip-networking directive. I removed this the MySQL configuration file and restarted the daemon. Sockstat showed MySQL was now listening but when I attempted to connect from a remote site I received this cryptic error message:
代碼: 選擇全部
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
代碼: 選擇全部
mysqld : ALL : allow