请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

mysql 报错

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY `447653cfde`  WITH GRA
NT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY `447653cfde`  WITH GRANT OPTION' at line 1

怎么解决?

正在回答 回答被采纳积分+3

2回答

lulye 2022-11-06 15:11:42

解决grant 授权报not allowed to create user with grant:

create database vueshop;  #创建数据库

alter user vueshop identified with mysql_native_password by 'xxx';  # XXX为修改的用户vueshop的密码

grant all privileges on vueshop.* to 'vueshop'@'%' ;  # 授权

flush privileges;  #刷新权限

下载视频          
0 回复 有任何疑惑可以回复我~
bobby 2022-09-05 21:55:25

你的mysql版本是多少?  如果版本没有问题  

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'root' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'root' WITH GRANT OPTION;

FLUSH PRIVILEGES;

确定一下是用的是这些命令吧

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号