一般只需要更改两个地方: mysql数据库的user表。 mysql> update user set Host='%' where user='root'; mysql的配置文件: bind-address = 127.0.0.1 #注释掉,或者更改为你允许的ip地址