当前位置:Gxlcms > 数据库问题 > mysql授权IP登录

mysql授权IP登录

时间:2021-07-01 10:21:17 帮助过:2人阅读

授权所有,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   

人气教程排行