본문 바로가기
MySQL 에러 처리법

4. replication 시 에러 발생

by 모모레 2010. 7. 12.
1. relay 로그를 제대로 읽지 못하는 경우 

 Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. 

위와 같은 에러가 발생한 경우는 Master에서 생성한 바이너리 로그나 Slave에서 생성한 relay log가 깨진 경우에 발생한다. 일반적으로는 relay log가 어떤 시스템적인 이유로 인해 잘못 생성되는 경우 그것을 제대로 읽지 못해서 발생하는 것이 대부분이므로, replication을 명시적으로 중단한 후, 현재 실행된 binary log의 위치를 보고, 그 이후부터 다시 읽어올수있도록 change master를 이용해 맞춘뒤, 다시 읽어오면 문제 없이 해결 할 수 있다.