2010年12月13日 星期一

出現Lost connection to MySQL server at 'reading initial communication packet'

在其他主機連MySQL皆沒問題,但在 A 主機上下
ssh> mysql -hxx.xx.xx.xx -uxx -pxx
出現
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

查詢MySQL的xx帳號,並無限制可連線的IP。
後查詢 MySQL 的 freeBSD 主機的 /etc/hosts.allow,並無寫A主機的IP,因此將 A 主機的 IP加入 /etc/hosts.allow 內即可。
ALL: xxx.xxx.xxx.xxx

參考來源:http://www.bramschoenmakers.nl/en/node/595

沒有留言: