我有一个mysql复制活动。1名主人和2名奴隶。第一个奴隶工作正常,但秒奴隶落后于主人。这是SHOW SLAVE STATUS \G的结果:
mysql> SHOW SLAVE STATUS \G;
*************************** 1. row ***************************
Slave_IO_State: Queueing master event to the relay log
Master_Host: IP ADDRESS
Master_User: user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.015204
Read_Master_Log_Pos: 88137432
Relay_Log_File: mysql-relay-bin.065545
Relay_Log_Pos: 150
Relay_Master_Log_File: mysql-bin.015199
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:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 16802785
Relay_Log_Space: 514144238
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: 36745
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: 1
1 row in set (0.54 sec)这是SHOW PROCESSLIST的结果
mysql> SHOW PROCESSLIST;
+----+-------------+-----------+------+---------+-------+----------------------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------------+-----------+------+---------+-------+----------------------------------------+------------------+
| 60 | root | localhost | NULL | Query | 0 | NULL | SHOW PROCESSLIST |
| 61 | system user | | NULL | Connect | 155 | Queueing master event to the relay log | NULL |
| 62 | system user | | NULL | Connect | 34378 | Reading event from the relay log | NULL |
+----+-------------+-----------+------+---------+-------+----------------------------------------+------------------+`有人能帮助解决这个问题吗?
发布于 2017-05-03 12:38:08
共享以下详细信息: 1)两个从站具有相同的硬件? 2)两个从站具有相同的配置(my.cnf)?3)网络速度必须是相同的,请检查此。
还可以在下面检查3),如果在两个从服务器上使用innodb,请检查innodb_buffer_pool_size。4)检查在这个特定事件上运行的是什么,以确定您需要优化任何查询。
https://dba.stackexchange.com/questions/172590
复制相似问题