Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of mysql Master-Slave Skip error

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you mysql master-slave skip error example analysis, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Non-gtid:

Stop slave

Set global sql_slave_skip_counter=1

Start slave

In the case of gtid:

Mysql > show slave status\ G

* * 1. Row *

Slave_IO_State: Waiting for master to send event

Master_Host: 192.168.2.71

Master_User: repl

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: bin.000106

Read_Master_Log_Pos: 507171444

Relay_Log_File: relay.000029

Relay_Log_Pos: 927311065

Relay_Master_Log_File: bin.000105

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:

Last_Errno: 1032

Last_Error: Could not execute Update_rows event on table cus_0042.stat_staff_performance; Can't find record in 'stat_staff_performance', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log bin.000105, end_log_pos 927311644

Skip_Counter: 0

Exec_Master_Log_Pos: 927310864

Relay_Log_Space: 1580915694

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 Update_rows event on table cus_0042.stat_staff_performance; Can't find record in 'stat_staff_performance', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log bin.000105, end_log_pos 927311644

Replicate_Ignore_Server_Ids:

Master_Server_Id: 71

Master_UUID: c9c73c70-c089-11e7-8544-00163e0ad76e

Master_Info_File: mysql.slave_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: 171206 13:31:50

Master_SSL_Crl:

Master_SSL_Crlpath:

Retrieved_Gtid_Set: c9c73c70-c089-11e7-8544-00163e0ad76e:49794684-62500914

Executed_Gtid_Set: c9c73c70-c089-11e7-8544-00163e0ad76e:1-61492947

Auto_Position: 1

Replicate_Rewrite_DB:

Channel_Name:

Master_TLS_Version:

1 row in set (0.00 sec)

Mysql > stop slave

Query OK, 0 rows affected (0.00 sec)

Mysql > set gtid_next='c9c73c70-c089-11e7-8544-00163e0ad76eRose 61492948'

Query OK, 0 rows affected (0.00 sec)

Mysql > begin

Query OK, 0 rows affected (0.00 sec)

Mysql > commit

Query OK, 0 rows affected (0.00 sec)

Mysql > set gtid_next='AUTOMATIC'

Query OK, 0 rows affected (0.00 sec)

Mysql > start slave

Query OK, 0 rows affected (0.00 sec)

The above is all the contents of the article "mysql Master-Slave Skip error example Analysis". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report