2015년 10월 5일 월요일
MySQL 5.6.14 Replication Bug with grant command
When I executed "GRANT" command with `database` option on Master DB - MySQL 5.6.14, error occur on Slave DB and replication stop.
It is bug only on MySQL 5.6.14. (http://bugs.mysql.com/bug.php?id=68892)
The error message is below.
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.10.242.147
Slave_IO_Running: Yes
Slave_SQL_Running: No <-- SQL Thread stop.
...
...
Last_SQL_Errno: 1590
Last_SQL_Error: The incident LOST_EVENTS occured on the master. Message: error writing to the binary log <-- LOST_EVENTS error.
...
"GRANT" command with database option ( 'database_name'.'*' ) occur the error 1589 on Slave DB.
mysql> grant show databases on test.* to 'hong'@'10.10.10.10';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
mysql> grant reload on test.* to 'test'@'10.10.10.10';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
mysql> grant process on test.* to 'test'@'10.10.10.10';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
mysql> grant file on test.* to 'test'@'10.10.10.10';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
## Error is not occur.
mysql> grant select, insert, update, delete on test.* to 'test'@'10.10.10.10';
Query OK, 0 rows affected (0.00 sec)
## Add file right, then error is occur.
mysql> grant select, insert, update, delete, file on test.* to 'test'@'10.10.10.10';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
## No error with all database (*.*)
mysql> > grant select, insert, update, delete, file on *.* to 'test'@'10.10.10.10';
Query OK, 0 rows affected (0.00 sec)
Read the binary log file when the error occur.
# at 1207
#140108 16:45:25 server id 136 end_log_pos 1264 CRC32 0x276edfa9
# Incident: LOST_EVENTS <---
RELOAD DATABASE; # Shall generate syntax error <---
This bug fixed on MySQL 5.6.15.
라벨:
1590,
5.6.14,
bug,
database,
error,
grant,
LOST_EVENTS,
mysql,
replication
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기