Error while grant execution can break replication in mysql 5.6
How?
Let me explain . Lets assume iam trying to issue a grant replication client privilege to an user as seen below:
mysql> grant replication client on mine.* to user@'10.29.1%';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
The above grant failed coz the global privilege was supposed to be granted on *.*.
Hence I re-execute by making corrections :
mysql> grant replication client on *.* to user@'10.29.1%';
Query OK, 0 rows affected (0.10 sec)
mysql> flush privileges;
All i did was corrected a grant statement. However this broke the replication of mysql database.
#120009 01:02:10 server id 1 end_log_pos 422 CRC32 0x4d815dbc
# Incident: LOST_EVENTS
RELOAD DATABASE; # Shall generate syntax error
# at 422
# Incident: LOST_EVENTS
RELOAD DATABASE; # Shall generate syntax error
# at 422
Concluding that any user on 5.6 which has GRANT privileges can break the replication if while executing any GRANT it error.
Cheers.
No comments:
Post a Comment