在用Navicat for MySQL遠程連接mysql的時候,出現了
Lost connection to MySQL server at ‘reading initial communication packet', system error: 0
好惡心,服務器重啟了一次,就一上午都是在處理mysql的各種問題。
第一步:找到:my.cnf文件
其實我也不知道在哪里,用指令幫我們找吧。
find / -name my.cnf
找到了后。
第二步:vi my.cnf
vi my.cnf
在mysqld下添加skip-name-resolve
保存。
問題解決,可以連上了。