两步:
把mysql数据库里user表里的root用户的 host字段改成%:update user set host = '%' where user ='root';
刷新:flush privileges;