我试图在MySQL中运行以下查询:
GRANT REPLICATION SLAVE ON *.* TO 'replication'@’10.141.2.%’ 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 '??10.141.2.%’ IDENTIFIED BY ‘slave’' at line 1
我做错了什么?
感谢。
答案 0 :(得分:1)
您正在使用“花哨的引号”(看看它们的“精益”)?将’
替换为'
'replication'@’10.141.2.%’
应为'replication'@'10.141.2.%'
(此外,您似乎也在IDENTIFIED BY ‘slave’;
上执行此操作)