Get the App
SLTechnology News&Howtos  ›  Development  › 

Application scenarios and instance usage of mysql group replication

Shulou Source: shulou.com Published: 2022-06-03 17:26:50 11月13日 Update

This article introduces the knowledge of "application scenarios and instance usage of mysql group replication". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Application scenario

1. Flexible replication environment of database. Group replication can flexibly increase and decrease the number of database instances in the cluster.

2. High availability of database environment.

When most of the servers in the cluster are available, group replication allows the database instance to go down, and the entire database service is available.

3. Replace the traditional master-slave replication structure in the database environment.

Example

Vim / etc/mysql.cnf first delete the content added in the previous experiment. Then add the following thing: server_id=1 the first node gtid_mode=ONenforce_gtid_consistency=ONmaster_info_repository=TABLErelay_log_info_repository=TABLEbinlog_checksum=NONE # turn off binlog check log_slave_updates=ONlog_bin=binlogbinlog_format=ROW# group replication depends on the line-based replication format transaction_write_set_extraction=XXHASH64loose-group_replication_group_name= "uuid checked out" # # see / var/lib/mysql/auto.cnfloose-group_replication_start_on_boot=offloose-group_replication_local_address= "172.25.254.1 iploose-group_replication_group_seeds= 33061" whether the current node's loose-group_replication_bootstrap_group=off## plug-in "172.25.254.1" 33061172.25.254.2 "loose-group_replication_bootstrap_group=off## plugin automatically boots This option usually needs to be off off. It only needs to be enabled by the node that initiates the replication of the group, and only starts once. If it is on, a group with the same name will be generated the next time it is started. Brain fissure may occur. Loose-group_replication_ip_whitelist= "127.0.0.1172.25.254.0 loose-group_replication_enforce_update_everywhere_checks=ONloose-group_replication_single_primary_mode=OFF#" two lines after which are the parameters to turn on the multi-master mode, "Application scenarios and instance usage of mysql group replication". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Data database instance scenario application content environment node more knowledge cluster service utility achievement of learning next east-west master-slave tradition parameter initiating group Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info OPPO Reno Huawei Xiaomi