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
10 -
编程浪子
2019-06-18
你好
您后面的描述 应该是把问题解决了吧。
112019-06-18
相似问题