因為 Mysql server 設定檔預設值僅允許本機連線登入操作資料庫(bind-address=localhost)，所以當我們以遠端連線登入時就會出現代號111的錯誤訊息而無法登入成功。要解決此一問題只需修改 /etc/mysql/my.cnf 設定檔的設定值(bind-address)改為主機IP位址，再重新啟重mysql服務，就能在遠端正常登入mysql。
I had some problems with a sql connexion returning the following error message:
“Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111″
This was due to the server acepting only localhst connexions and the client to be on a remote host.
To fix this one needs to edit his “my.cnf" file (at /etc/my.cnf or /etc/mysql/my.cnf) and comment the “skip-networking" networking line and put the server IP address in “bind-address" as shown below:
bind-address = 220.127.116.11 # server IP address
After the mysql server needs restarting: