有没有办法在不经过MySQL :: MySQL 5.1 Reference Manual :: 16 Replication的情况下重新启动复制。
我没有看到任何错误master
,我不完全确定为什么slave
会遇到以下问题:
mysql> SHOW SLAVE STATUS\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: Master_Host-FQDN.TLD
Master_User: Master_User-REPL
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000057
Read_Master_Log_Pos: 247673142
Relay_Log_File: mysql:PR_DB-relay-bin.000041
Relay_Log_Pos: 5537565
Relay_Master_Log_File: mysql-bin.000044
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB: RDD1,RDD2,RDDX
Replicate_Ignore_DB: information_schema,mysql
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1594
Last_Error: 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.
Skip_Counter: 0
Exec_Master_Log_Pos: 25338679
Relay_Log_Space: 2190669763
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_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1594
Last_SQL_Error: 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.
1 row in set (0.00 sec)
ERROR:
No query specified
mysql>
--log-error=/var/log/mysqld.log
(奴隶):
140630 9:10:53 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 255, event_type: 2
140630 9:10:53 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
140630 9:10:53 [ERROR] Slave SQL: 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. Error_code: 1594
140630 9:10:53 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000044' position 25338679
我可以使用CHANGE MASTER TO
(MySQL :: MySQL 5.1 Reference Manual :: 16.1.1.10 Setting the Master Configuration on the Slave)并指向各自的值:
MASTER_LOG_FILE
=Relay_Master_Log_File
,MASTER_LOG_POS
Exec_Master_Log_Pos
.
你应该复制的最安全的位置是
这些代表在从站上执行的最新二进制日志事件。那是您从中获取复制的地方。运行
CHANGE MASTER TO
将擦除中继日志并从全新的中继日志开始。就我而言,似乎我遇到了同样的问题:
查看从服务器的错误日志,我可以看到根本原因是磁盘空间不足的问题:
一旦我解决了这个问题,恢复复制的方法是:
Relay_Master_Log_File
和Exec_Master_Log_Pos
值。在我的情况下,gtc-master-bin.000022
和74792622
。这边走:
然后它又开始正常工作了。
我有同样的错误我这样做:
执行此操作后,我看到:此错误的重复输入错误(1062 错误)我执行以下步骤:
和从属正常复制没有任何错误