moneyslow.com

报错ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

mysql数据库技巧

mysql数据库技巧

大概意思是全局参数不能设置到特定数据库
Since the REPLICATION SLAVE privileges are global and can not be assigned to a particular database, they must be specified globally in the query, so the SQL query should look like this:
改成*.*就好了:
GRANT REPLICATION SLAVE ON *.* TO "replication"@"192.168.1.9" IDENTIFIED BY "password";

Exit mobile version