mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 192.168.160.101
Master_User: vemssms
Master_Port: 3307
Connect_Retry: 10
Master_Log_File: mysqlbin.000024
Read_Master_Log_Pos: 595918761
Relay_Log_File: snbc-ssms-swarm-centos7-01-relay-bin.000088
Relay_Log_Pos: 48512702
Relay_Master_Log_File: mysqlbin.000024
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table: vems_statis.%
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 595918761
Relay_Log_Space: 48512930
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: 1047
Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master. Error: WSREP has not yet prepared node for application use
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 150
Master_UUID: b4d7c925-a6c6-11e9-8866-525400a9489f
Master_Info_File: /data/mysql/data/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp: 190730 06:32:58
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.00 sec)
ERROR:
No query specified
1.这个错误直接重新启动从服务即可
stop slave;
start slave;
>show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.160.101
Master_User: vemssms
Master_Port: 3307
Connect_Retry: 10
Master_Log_File: mysqlbin.000028
Read_Master_Log_Pos: 52226299
Relay_Log_File: snbc-ssms-swarm-centos7-01-relay-bin.000091
Relay_Log_Pos: 23125312
Relay_Master_Log_File: mysqlbin.000026
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table: vems_statis.%
Last_Errno: 1032
Last_Error: Could not execute Delete_rows event on table vems.t_anal_pool_m_vcount; Can't find record in 't_anal_pool_m_vcount', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysqlbin.000026, end_log_pos 23133510
Skip_Counter: 0
Exec_Master_Log_Pos: 23125101
Relay_Log_Space: 161927129
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: 1032
Last_SQL_Error: Could not execute Delete_rows event on table vems.t_anal_pool_m_vcount; Can't find record in 't_anal_pool_m_vcount', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysqlbin.000026, end_log_pos 23133510
Replicate_Ignore_Server_Ids:
Master_Server_Id: 150
Master_UUID: b4d7c925-a6c6-11e9-8866-525400a9489f
Master_Info_File: /data/mysql/data/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp: 190730 11:19:46
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.00 sec)
ERROR:
No query specified
- 以下这是因为统计类的sql主从不一致导致的,因为统计类业务已不在主节点操作,所以可以直接使用参数replicate-wild-ignore-table = “vems.t_anal_pool%” 忽视统计类表的同步语句
Could not execute Delete_rows event on table vems.t_anal_pool_m_vcount; Can’t find record in ‘t_anal_pool_m_vcount’, Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event’s master log mysqlbin.000026,