最近有幾個人問我相同問題,安裝了mysql,然後用 telnet ip 3306,端口後報
Host 192.168.1.163 is not allowed to connect to this MySQL serverConnection closed by foreign ,雖然自己以前也碰到過,後來解決了,但是覺得還是值得貼出來,估計會有很多人同樣碰到過,
解決辦法:
mysql>UPDATE mysql.user SET Host=% WHERE Host=localhost;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%" ;
mysql>FLUSH PRIVILEGES;