mysql8.0中给用户赋予权限报错问题解决?

来源:8-3 开启genelog

赵佳子彧

2019-06-17

mysql> grant all privileges on *.* to 'xiaokang'@'%' identified by '123456' with grant 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 ‘123456’ with grant option’ at line 1

因为新版的的mysql版本已经将创建账户和赋予权限的方式分开了

创建用户:ALTER USER 'xiaokang'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; 
赋予权限:grant all privileges on *.* to 'xiaokang'@'%' with grant option;
写回答

2回答

赵佳子彧

提问者

2019-06-18

https://mp.csdn.net/postedit/92800663 

1
0

编程浪子

2019-06-18

你好

您后面的描述 应该是把问题解决了吧。

1
1
赵佳子彧
是的,放这里让后学的参考
2019-06-18
共1条回复

快速上手Linux 玩转典型应用

以主流CentOS 7 操作系统为例,系统讲解Linux,真实线上环境助你快速上手,独立配置运维服务器

1663 学习 · 572 问题

查看课程