码迷,mamicode.com
首页 > 数据库 > 详细

mysql授权IP登录

时间:2019-12-16 00:02:16      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:host   mys   you   ide   let   指定   HERE   root   roo   

授权所有,youpassword为登录密码
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘youpassword‘ WITH GRANT OPTION;

指定IP
GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘171.111.8.130‘ IDENTIFIED BY ‘youpassword‘ WITH GRANT OPTION;

如果失败删除后重新授权
delete from user where host = ‘171.111.8.130‘ and user = ‘root‘;

保存配置

flush privileges;

mysql授权IP登录

标签:host   mys   you   ide   let   指定   HERE   root   roo   

原文地址:https://www.cnblogs.com/shihx/p/12046563.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!