给登录用户授权
grant all privileges on *.* to root@‘%‘ identified by "password";
刷新权限
flush privileges;
查询是否刷新权限成功
select host,user,password from user;
允许mysql服务远程访问
原文:https://www.cnblogs.com/coldc/p/11428739.html