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

How to change traditional mode replication to GTID replication mode online

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article will explain in detail how to change the traditional mode to GTID mode online. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

1. Set ENFORCE_GTID_CONSISTENCY=WARN on each server. After setting this step, everything is allowed to violate the consistency of GTID. After setting, make sure there are no warnings in the error log.

Set @ @ GLOBAL.ENFORCE_GTID_CONSISTENCY=WARN

two。 Set up ENFORCE_GTID_CONSISTENCY=ON; on each server to ensure that nothing violates the consistency of GTID

Set @ @ GLOBAL.ENFORCE_GTID_CONSISTENCY=ON

3. Setting GTID_MODE=OFF_PERMISSIVE on each server means that new things are anonymous and that things that are allowed to be copied are GTID or anonymous.

Set @ @ GLOBAL.GTID_MODE=OFF_PERMISSIVE

4. Setting up GTID_MODE=ON_PERMISSIVE on each server means that new things use GTID, while things that are allowed to be copied are GTID or anonymous.

Set @ @ GLOBAL.GTID_MODE=ON_PERMISSIVE

5. The value of waiting for ONGOING_ANONYMOUS_TRANSACTION_COUNT status is 0

Show status like 'ONGOING_ANONYMOUS_TRANSACTION_COUNT'; queries all slave libraries for this state, which must be 0 to proceed to the next step, which represents the number of things in progress that have been marked anonymous, and a status value of 0 indicates that there is nothing waiting to be processed.

6. Set GTID_MODE=ON on each service and enable GTID

Set @ @ global.gtid_mode=on

7. Modify the configuration of my.cnf. After the configuration modification, the configuration will take effect even if the database is restarted.

Gtid_mode=on

Enforce_gtid_consistency=1

This is the end of the article on "how to change the traditional mode to GTID replication mode online". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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

Wechat

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

12
Report