我有一个在主服务器运行后启动的从服务器。我在 master bin 日志中的一个位置启动它,那时我开始在 master 上导入数据库。这个从站一直在运行,但现在卡住了,没有进展。它一直停留在中继主日志 000055 和位置数小时。
show slave status的结果:
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: db10.domain.com
Master_User: replicator
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: DB10-bin.000102
Read_Master_Log_Pos: 917727958
Relay_Log_File: dbbk9-relay-bin.000152
Relay_Log_Pos: 863694346
Relay_Master_Log_File: DB10-bin.000055
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table: %.rmallaccountinfo,%.rmaccountbalance,%.rmoldestcharge,%.rmautotemp,%.rmitemtemp,%.rmcust
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 863694199
Relay_Log_Space: 56169138270
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: 842902
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 100
一组中的 1 行(0.00 秒)
我在主二进制日志中查找该位置的内容,它只是一个放置临时表:
# at 863694053
#120827 15:32:50 server id 100 end_log_pos 863694199 Query thread_id=6068 exec_time=0 error_code=0
SET TIMESTAMP=1346095970/*!*/;
DROP TEMPORARY TABLE IF EXISTS `rmtemptableinclude` /* generated by server */
/*!*/;
# at 863694199
#120827 15:32:51 server id 100 end_log_pos 863694282 Query thread_id=7152 exec_time=1 error_code=0
SET TIMESTAMP=1346095971/*!*/;
BEGIN
/*!*/;