MySQL复制卡住了

MySQL复制卡住了,mysql,replication,database-replication,master-slave,Mysql,Replication,Database Replication,Master Slave,我设置了从主服务器到从服务器的MySQL复制。“SHOW SLAVE STATUS\G”显示的秒数比\u Master的秒数持续增加。下面是从最早(顶部)到最新(底部)的三个连续结果。有人知道怎么了吗 1 mysql> SHOW SLAVE STATUS\G *************************** 1. row *************************** Slave_IO_State: Queueing master eve

我设置了从主服务器到从服务器的MySQL复制。“SHOW SLAVE STATUS\G”显示的秒数比\u Master的秒数持续增加。下面是从最早(顶部)到最新(底部)的三个连续结果。有人知道怎么了吗

1

    mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
               Slave_IO_State: Queueing master event to the relay log
                  Master_Host: <excluding>
                  Master_User: <excluding>
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.002723
          Read_Master_Log_Pos: 893947806
               Relay_Log_File: design-hotels-database-relay-bin.000002
                Relay_Log_Pos: 7692403
        Relay_Master_Log_File: mysql-bin.002723
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB:
          Replicate_Ignore_DB: starwood_sop,starwood_blp
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 192464416
              Relay_Log_Space: 709176017
              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: 76613
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: 3
                  Master_UUID:
             Master_Info_File: /var/lib/mysql/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Reading event from the relay log
           Master_Retry_Count: 86400
                  Master_Bind:
      Last_IO_Error_Timestamp:
     Last_SQL_Error_Timestamp:
               Master_SSL_Crl:
           Master_SSL_Crlpath:
           Retrieved_Gtid_Set:
            Executed_Gtid_Set:
                Auto_Position: 0
         Replicate_Rewrite_DB:
                 Channel_Name:
           Master_TLS_Version:
1 row in set (0.04 sec)
mysql>显示从机状态\G
*************************** 1. 划船***************************
从IO状态:将主事件排队到中继日志
主机:
主用户:
船长港:3306
连接重试:60
主日志文件:mysql-bin.002723
读取主日志位置:893947806
中继日志文件:design-hotels-database-Relay-bin.000002
继电器日志位置:7692403
中继主机日志文件:mysql-bin.002723
正在运行的从机:是
Slave\u SQL\u正在运行:是
复制\u Do\u数据库:
复制忽略数据库:喜达屋sop、喜达屋blp
复制\u Do\u表:
复制\u忽略\u表:
复制\u Wild\u Do\u表:
复制\u野生\u忽略\u表:
最后错误编号:0
最后一个错误:
跳过计数器:0
执行主日志位置:192464416
中继日志空间:709176017
直到条件:无
直到日志文件:
直到日志位置:0
允许的主\u SSL\u:否
主\u SSL\u CA\u文件:
主\u SSL\u CA\u路径:
主SSL证书:
主\u SSL\u密码:
主\u SSL\u密钥:
主控台后面的秒数:76613
主\u SSL\u验证\u服务器\u证书:否
最后一个IO错误号:0
最后一个IO错误:
最后\u SQL\u错误号:0
最后一个SQL错误:
复制\u忽略\u服务器\u ID:
主服务器Id:3
硕士学位:
Master\u Info\u文件:/var/lib/mysql/Master.Info
SQL\u延迟:0
SQL\u剩余\u延迟:NULL
Slave_SQL_Running_状态:从中继日志读取事件
主机重试次数:86400
大师班:
最后\u IO\u错误\u时间戳:
上次\u SQL\u错误\u时间戳:
主\u SSL\u Crl:
主SSL路径:
检索到的\u Gtid\u集:
已执行的_Gtid_集:
自动位置:0
复制\u重写\u数据库:
频道名称:
主版本:
一组1行(0.04秒)
2

mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
               Slave_IO_State: Queueing master event to the relay log
                  Master_Host: <excluding>
                  Master_User: <excluding>
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.002723
          Read_Master_Log_Pos: 908310158
               Relay_Log_File: design-hotels-database-relay-bin.000002
                Relay_Log_Pos: 7906291
        Relay_Master_Log_File: mysql-bin.002723
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB:
          Replicate_Ignore_DB: starwood_sop,starwood_blp
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 192678304
              Relay_Log_Space: 723538369
              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: 76698
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: 3
                  Master_UUID:
             Master_Info_File: /var/lib/mysql/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Reading event from the relay log
           Master_Retry_Count: 86400
                  Master_Bind:
      Last_IO_Error_Timestamp:
     Last_SQL_Error_Timestamp:
               Master_SSL_Crl:
           Master_SSL_Crlpath:
           Retrieved_Gtid_Set:
            Executed_Gtid_Set:
                Auto_Position: 0
         Replicate_Rewrite_DB:
                 Channel_Name:
           Master_TLS_Version:
1 row in set (0.06 sec)
mysql>显示从机状态\G
*************************** 1. 划船***************************
从IO状态:将主事件排队到中继日志
主机:
主用户:
船长港:3306
连接重试:60
主日志文件:mysql-bin.002723
读取主日志位置:908310158
中继日志文件:design-hotels-database-Relay-bin.000002
继电器日志位置:7906291
中继主机日志文件:mysql-bin.002723
正在运行的从机:是
Slave\u SQL\u正在运行:是
复制\u Do\u数据库:
复制忽略数据库:喜达屋sop、喜达屋blp
复制\u Do\u表:
复制\u忽略\u表:
复制\u Wild\u Do\u表:
复制\u野生\u忽略\u表:
最后错误编号:0
最后一个错误:
跳过计数器:0
执行主日志位置:192678304
中继日志空间:723538369
直到条件:无
直到日志文件:
直到日志位置:0
允许的主\u SSL\u:否
主\u SSL\u CA\u文件:
主\u SSL\u CA\u路径:
主SSL证书:
主\u SSL\u密码:
主\u SSL\u密钥:
落后于主机的秒数:76698
主\u SSL\u验证\u服务器\u证书:否
最后一个IO错误号:0
最后一个IO错误:
最后\u SQL\u错误号:0
最后一个SQL错误:
复制\u忽略\u服务器\u ID:
主服务器Id:3
硕士学位:
Master\u Info\u文件:/var/lib/mysql/Master.Info
SQL\u延迟:0
SQL\u剩余\u延迟:NULL
Slave_SQL_Running_状态:从中继日志读取事件
主机重试次数:86400
大师班:
最后\u IO\u错误\u时间戳:
上次\u SQL\u错误\u时间戳:
主\u SSL\u Crl:
主SSL路径:
检索到的\u Gtid\u集:
已执行的_Gtid_集:
自动位置:0
复制\u重写\u数据库:
频道名称:
主版本:
一组1行(0.06秒)
3

mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
               Slave_IO_State: Queueing master event to the relay log
                  Master_Host: <excluding>
                  Master_User: <excluding>
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.002723
          Read_Master_Log_Pos: 945765663
               Relay_Log_File: design-hotels-database-relay-bin.000002
                Relay_Log_Pos: 8389913
        Relay_Master_Log_File: mysql-bin.002723
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB:
          Replicate_Ignore_DB: starwood_sop,starwood_blp
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 193161926
              Relay_Log_Space: 760993874
              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: 76870
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: 3
                  Master_UUID:
             Master_Info_File: /var/lib/mysql/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Reading event from the relay log
           Master_Retry_Count: 86400
                  Master_Bind:
      Last_IO_Error_Timestamp:
     Last_SQL_Error_Timestamp:
               Master_SSL_Crl:
           Master_SSL_Crlpath:
           Retrieved_Gtid_Set:
            Executed_Gtid_Set:
                Auto_Position: 0
         Replicate_Rewrite_DB:
                 Channel_Name:
           Master_TLS_Version:
1 row in set (0.04 sec)
mysql>显示从机状态\G
*************************** 1. 划船***************************
从IO状态:将主事件排队到中继日志
主机:
主用户:
船长港:3306
连接重试:60
主日志文件:mysql-bin.002723
读取主日志位置:945765663
中继日志文件:design-hotels-database-Relay-bin.000002
继电器日志位置:8389913
中继主机日志文件:mysql-bin.002723
正在运行的从机:是
Slave\u SQL\u正在运行:是
复制\u Do\u数据库:
复制忽略数据库:喜达屋sop、喜达屋blp
复制\u Do\u表:
复制\u忽略\u表:
复制\u Wild\u Do\u表:
复制\u野生\u忽略\u表:
最后错误编号:0
最后一个错误:
跳过计数器:0
执行主任日志位置:193161926
中继日志空间:760993874
    Exec-pos              Read-pos
1:  192464416             893947806
2:  192678304 (+213,888)  908310158 (+14,362,352
3:  193161926 (+483,622)  945765663 (+37,455,505) 
innodb_buffer_pool_size = <high> # depends on server RAM and other factors 
innodb_log_file_size = 1G # or more
innodb_flush_log_at_trx_commit = 2
master_info_repository = TABLE
relay_log_info_repository = TABLE
relay_log_recovery = ON
sync_master_info = 0
binlog_format = ROW # make sure all tables have PRIMARY KEY constraints