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

What is the method of upgrading Mysql to GTID mode

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

Share

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

This article mainly explains "what is the method of upgrading Mysql to GTID mode". The explanation in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian and go deep into it slowly to study and learn "what is the method of upgrading Mysql to GTID mode" together!

Preamble:

MySQL 5.7.6 and later versions are required.

All members of the group gtid_mode are off.

Implementation steps:

All Server Execution

set @@global.enforce_gtid_consistency = warn;

Special note: this step is a closed step to use without warning.

2. Execute on all servers:

set @@global.enforce_gtid_consistency = on;

3. Execute on all servers (don't care about the first and last, but execute it completely):

set @@global.gtid_mode = off_permissive;

Implementation:

set @@global.gtid_mode=on_permissive;

In essence, the logs that are suddenly generated in this step are all logs with GTID. This step is claimed to be unrelated to any node, but it is recommended to execute it on the slave first, and then on the master.

Confirm that the traditional binlog copy is complete, the value is 0

show status like 'ongoing_anonymous_transaction_count';

All nodes must be identified as 0.

All nodes make a judgment show status like 'ongoing_anonymous_transaction_count'; is zero

All nodes can also execute: flush logs; to switch logs.

All nodes enable gtid_mode

set @@global.gtid_mode=on

Write gtid_mode = on-related configuration to configuration file

gtid_mode=on

enforce_gtid_consistency=on

Enable automatic lookup node replication for Gtid:

stop slave;

change master to master_auto_position=1;

start slave;

Thank you for reading, the above is "Mysql upgrade to GTID mode method is what" content, after the study of this article, I believe that we upgrade to GTID mode Mysql method is what this problem has a deeper understanding, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

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