MySQL 版本:'for the right syntax to use near 'identified by 'password' with grant option'
  TEZNKK3IfmPf 2023年11月14日 19 0

MySQL 5.7 版本授权语句:

GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD ON *.* TO 'exporter'@'%' IDENTIFIED BY 'exporterpw';
flush privileges;

执行得到报错:

[2022-08-09 09:18:07] [42000][1064] 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 'exporterpw'' at line 1

昨天将 mysql 版本从 5.7.34 升级到了 8.0.3 ,应该是由于版本升级导致。

mysql 8.0 授权的语句:

create user 'exporter'@'%' identified by  'exporterpw' ;
grant SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD on *.* to 'exporter'@'%' with grant option ;
flush privileges;
【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月14日 0

暂无评论

推荐阅读
  TEZNKK3IfmPf   2024年05月31日   27   0   0 mysql
  TEZNKK3IfmPf   2024年05月17日   54   0   0 sqlmysql
  TEZNKK3IfmPf   2024年05月31日   31   0   0 数据库mysql
  TEZNKK3IfmPf   2024年05月17日   50   0   0 查询mysql索引
  TEZNKK3IfmPf   2024年05月17日   50   0   0 jsonmysql
  TEZNKK3IfmPf   2024年05月17日   51   0   0 mysqlphp
  TEZNKK3IfmPf   2024年05月31日   27   0   0 数据库mysql
TEZNKK3IfmPf