1.授权
grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;flush privileges;
2.改表
use mysql update user set host = '%' where user = 'root';