进入MySQL命令行 mysql -uroot -p USE mysql; UPDATE USER SET host = '%' where user = 'root'; FLUSH PRIVILEGES;