Mysql授权远程登录

Mysql授权远程登录

错误原因:

...null, message from server: "Host 'XXX' is not allowed to connect t

操作步骤:

  第一步:打开mql链接工具,参考下图:

    

  第二步:找到要设置授权的数据库,点击查询,新建查询,如下图:

    

    

  第三步:输入授权指令

1 grant all privileges on *.* to '用户名'@'%' identified by '登录密码' with grant option;
2 
3 /**
4 *例如:grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
5 **/

 

1 flush privileges;

  第四步:测试,授权成功,问题已解决

 

posted @ 2019-03-06 11:33  小小飞郭  阅读(12058)  评论(0编辑  收藏  举报