문제

I have a slave that was started after the master had been running. I started it at a position in the master bin log that was when I started to import databases on the master. This slave has been running, but now is stuck and not progressing. It has been stuck at relay master log 000055 and position for hours.
Results of 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 row in set (0.00 sec)

I look up what is at that position in the master binlog and its just a drop temp table:

# 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
/*!*/;
도움이 되었습니까?

해결책

Whenever I see replication hungup on something, there's an error displayed in the STATUS output...

You can try skipping one statement in the replication:

STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;

다른 팁

I just experienced the same thing, slave not reporting any error, just stuck on an old "Read_Master_Log_Pos" I executed a "STOP SLAVE;" followed by a "START SLAVE;" and now it's catching up with the master! This is a little disconcerting b/c the slave wasn't even reporting that it was stuck.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top