Get the App
SLTechnology News&Howtos  ›  Database  › 

What is the method of upgrading Mysql to GTID mode

Shulou Source: shulou.com Published: 2022-05-31 13:57:40 10月01日 Update

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!

Tags: Nodes methods patterns upgrades logs steps learning content configuration tradition essence that is ideas situations members files articles more first version Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL OPPO Reno Xiaomi MariaDB Huawei