Mariadb10.xGTID replication mode
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