Mysql replication 중에 오류입니다.
mysql 이중화를 하려고 하는데요
일단 제가 한것은
마스터 server_id=1 로 바꾸고
슬레이브 접속할 사용자 생성
슬래이브 server_id=2 로 바꾸고
change master to master_host='111.111.0.1', master_user='repluser', master_port=3306, master_password='neulwonpassword', master_log_file='mysql-bin.000010', master_log_pos=2111;
해준 정도 입니다.
마스터에서 show slave status\G; 를 해보니
Slave_IO_Running: Yes
Slave_SQL_Running: No
Last_Errno: 1062
Last_Error: Could not execute Write_rows event on table AAA.USER; Duplicate entry '29' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000002, end_log_pos 952
이런상태이고요.
슬레이브쪽 에러로그는
[ERROR] Error reading packet from server: Client requested master to start replication from impossible position; the first event 'mysql-bin.000006' at 1227256, the last event read from '/data/mysql/mysql-binlog/mysql-bin.000006' at 4, the last byte read from '/data/mysql/mysql-binlog/mysql-bin.000006' at 4. ( server_errno=1236)
[ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'mysql-bin.000006' at 1227256, the last event read from '/data/mysql/mysql-binlog/mysql-bin.000006' at 4, the last byte read from '/data/mysql/mysql-binlog/mysql-bin.000006' at 4.', Error_code: 1236
이렇게 떨어지는데.. 이유를 모르겠네요.. 가르침좀 주세요.
댓글 달기