分类: Mysql/postgreSQL
2010-04-12 22:42:33
show slave status显示以下错误信息 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. Error_code: 0
步骤:
#>show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: xx.xxx.218
Master_User: fbrep
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: fb-bin.000092
Read_Master_Log_Pos: 656277404
Relay_Log_File: fb-relay.000356
Relay_Log_Pos: 581305814
Relay_Master_Log_File: fb-bin.000092
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB: fb,fb
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error: 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.
Skip_Counter: 1
Exec_Master_Log_Pos: 131 (有时好象不对,所以特别小时要小心)
Relay_Log_Space: 656280278
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
备份: master.info 及relay.info ,
方法1: 记下Relay_Master_Log_File: fb-bin.000092, Exec_Master_Log_Pos: 131 (有时好象不对,所以特别小时要小心).
change master to MASTER_LOG_FILE='fb-bin.000092' , MASTER_LOG_POS=131 (这样pos特别小有时会不对,用方法2)
方法2:
cat master.info ##
14
fb-bin.000092
657927031
xx.xx.44.218
fbrep
4rep0u1y
3306
60
0
##
[root@TJSJHL212-128 message2.kdb var]# cat relay-log.info
./fb-relay.000356
581305814
fb-bin.000092
131
05549
5
##
# mysqlbinlog fb-relay.000357 | more
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
# at 4
#100412 15:50:58 server id 200128 end_log_pos 98 Start: binlog v 4, server v 5.0.27-standard-log created 100412 15:50:58
# at 98
#700101 8:00:00 server id 16218 end_log_pos 0 Rotate to fb-bin.000092 pos: 581305707
#
change master:
change master to master_host='xx.xx.218',MASTER_USER='xx',MASTER_PASSWORD='xx',
-> master_port=3306,MASTER_LOG_FILE='fb-bin.000092',MASTER_LOG_POS=581305707;