首页 > 数据库技术 > 详细

check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'xsw123456' WITH GRANT OPTION' at line 1

时间:2020-04-26 15:43:27      阅读:449      评论:0      收藏:0      [点我收藏+]

错误如图:
技术分享图片
场景,mysql8.0.17修改mysql用户权限,开启所有ip可访问
使用:GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘密码‘ WITH GRANT OPTION;
报错,所以我使用如下方法
使用mysql
use mysql
修改密码:
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘密码‘;
修改ip为所有可访问
update user set host=‘%‘ where user=‘root‘;
查看
select host,user from user;
刷新
flush privileges;

或者可以使用
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘密码‘;
flush privileges;
navicat连接,ok

check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'xsw123456' WITH GRANT OPTION' at line 1

原文:https://www.cnblogs.com/stronger-xsw/p/12779385.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!