Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Mariadb10.xGTID replication mode

Shulou Source: shulou.com Published: 2022-06-01 07:03:45 10月03日 Update

The commonly used master_log_file,master_log_pos replication method will cause data inconsistency when the main database is down.

Mariadb10.x supports GTID replication by default.

1. Unsupported parameter

Gtid-mode=on

Enforce-gtid-consistency=true

two。 Modified parameter

Parameter slave-parallel-workers is changed to slave-parallel-threads.

3. Commands used to connect to the main service

Added: master_use_gtid= current_pos | slave_pos | no

Configure the master-slave replication mode:

Method 1: traditional method CHANGE MASTER TOMASTER_HOST='10.0.22.248',MASTER_PORT=3306,MASTER_USER='liuwei',MASTER_PASSWORD='123456',MASTER_LOG_FILE='mysql-bin.000024',MASTER_LOG_POS=875; method 2: MASTER_USE_GTID way CHANGE MASTER TOMASTER_HOST='10.0.22.248',MASTER_PORT=3306,MASTER_USER='liuwei',MASTER_PASSWORD='123456',MASTER_USE_GTID=slave_pos

A more detailed introduction to GTID:

Reference: http://www.tuicool.com/articles/raaMfeV

Tags: Mode parameter method support consistency master-slave tradition command that is commonly used data machine time problem reference service configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker NVidia Shulou Tech Info Redmi Huawei