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

Improvement of GTID replication in MySQL5.7

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Support the creation of temporary tables

The MySQL5.7 version can support create temporary table and drop temporary table commands.

2. Enable GTID replication mode. You do not need to enable log_slave_updates parameter

For MySQL5.6 version of GTID replication mode, the log_slave_updates parameter must be enabled, otherwise the startup will report an error, because the synchronous replication information (UUID: transaction number) needs to be found in binlog.

3. Enable / disable GTID online without restarting the mysqld process

In the GTID replication mode of the MySQL5.6 version, the parameters gtid_mode=ON and enforce_gtid_consistency=ON cannot be dynamically modified and must be written into the my.cnf file, and the mysqld processes of the master and slave libraries must be restarted to take effect.

In the MySQL5.7 version, online switching of GTID replication mode is supported, which increases the availability of the system.

The default replication mode switches to GTID replication mode (both master and slave libraries are executed in the following order):

Mysql > set global gtid_mod='OFF_PERMISSIVE'

Mysql > set global gtid_mod='ON_PERMISSIVE'

Mysql > set global enforce_gtid_consistency=ON

Mysql > set global gtid_mode='ON'

GTID replication mode is switched to default replication (both master and slave libraries are executed in the following order):

Mysql > stop slave

Mysql > set global gtid_mod='ON_PERMISSIVE'

Mysql > set global gtid_mod='OFF_PERMISSIVE'

Mysql > change master to master_auto_position=0

Mysql > set global gtid_mode='OFF'

Mysql > set global enforce_gtid_consistency=OFF

Mysql > start slave

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