分配权限报错,MYSQL 8
来源:3-3 Ubuntu中通过Docker安装配置MySQL主从节点

codegg
2021-02-23
mysql> GRANT REPLICATION SLAVE ON . TO ‘slave’@’%’ IDENTIFIED BY ‘slave’;
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 ‘slave’’ at line 1
写回答
1回答
-
xiaomo
2021-03-04
同学你好,mysql8的sql语句和mysql5.7版本不一样,Mysql的授权指令要分开执行,比如:
create user 'slave'@'%' identified by 'slave'; GRANT REPLICATION SLAVE ON *.* TO 'slave'@'%' with grant option;
00
相似问题