1. 程式人生 > >連線Mysql報錯lost connection to MySQL server at "waiting for initial communication packet

連線Mysql報錯lost connection to MySQL server at "waiting for initial communication packet

打開了3306埠,設定了user表host為'%',依然無法連線,telnet 3306埠不同,原因是配置檔案中設定了 bind-address: 127.0.0.1,(/etc/mysql/mysql.conf.d/sqld.cnf )把他註釋掉,埠能連上,但是又報下面的錯誤

lost connection to MySQL server at "waiting for initial communication packet

在 /etc/mysql/mysql.conf.d/sqld.cnf 檔案中增加 skip-name-resolve 就可以連線了