免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年5月8日 星期五

mysql, error 1221, grant replication slave


//===
http://stackoverflow.com/questions/13552206/grant-file-on-just-one-database

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

mysql> grant file on johndatabase.* to 'john'@'localhost';

--> grant file on *.* to 'john'@'localhost';


mysql> grant replication slave on db1.* to 'repl001'@'192.168.42.30'

--> grant replication slave on *.* to 'repl001'@'192.168.42.30'


Both "file" and "replication slave" are Global privileges,
which cannot be granted to a specific database.



//=== confusing and conflicting setup for replication user repl_u13
mysql> grant replication slave on *.* to repl_u13@'%' identified by 'pass1';
mysql> grant replication slave on *.* to repl_u13@'192.168.42.30' identified by 'pass2';

taking either one, not both, to avoid troubles.

沒有留言:

張貼留言