关闭MySQL root用户远程访问权限:
use mysql;
update user set host = "localhost" where user = "root" and host = "%";
flush privileges;
打开MySQL root用户的远程访问权限:
update user set host = "%" where user = "root";