In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to use the MySQL 5.7replication control statement SET GLOBAL sql_slave_skip_counter, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
SET GLOBAL sql_slave_skip_counter = N
This parameter skips the next N events from the master node. This parameter is used to fix the replication stop caused by the SQL statement.
This statement is valid only if the thread of the slave node is not running. Otherwise, false positives will occur.
When using this statement, you need to understand that the binary log is actually a series of event groups. Each event group contains a series of events. For transaction tables, an event group corresponds to a transaction. For non-transactional tables, an event group corresponds to a separate SQL statement. It is important to note that a single transaction may contain both transaction and non-transaction tables.
When skipping events using SET GLOBAL sql_slave_skip_counter, the slave node is in the middle of the transaction group, it continues to skip some events until it reaches the end of a transaction group, and then the slave node starts execution from the next event group.
The default value for this parameter is 0
Mysql > show variables like 'sql_slave%'
+-+ +
| | Variable_name | Value |
+-+ +
| | sql_slave_skip_counter | 0 | |
+-+ +
1 row in set (0.00 sec)
These are all the contents of this article entitled "how to use MySQL 5.7replication Control statement SET GLOBAL sql_slave_skip_counter". 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.