select host,user from mysql.user;
host为% 代表可以任意机器远程登陆
update mysql.user set host='%' where user='root' and host='localhost'; flush privileges;
修改后的root用户可以在其他机器登陆