添加远程用户:
use mysql;
update user set host = "%" where user = "root";
grant all privileges on *.* to root@"%" identified by 'password' with grant option;
flush privileges;
关闭远程访问:
use mysql;
update user set host = "localhost" where user = "root" and host= "%";
flush privileges;
查看用户权限:
use information_schema;
select * from user_privileges;