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

Description and instance usage of mysql group replication

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly explains "the description and example usage of mysql group replication". the explanation content 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 "the description and example usage of mysql group replication" together!

description

MySQL Group Replication is a MySQL plug-in that builds on the existing MySQL replication infrastructure and leverages features such as binary logging, row-based logging, and global transaction identifiers.

It integrates current MySQL frameworks such as performance patterns, plug-ins, and service infrastructure.

2. Group replication is based on distributed consistency algorithm.

A group allows some nodes to hang up. As long as most of the nodes are still alive and there are no problems communicating with each other, the group can still provide services to the outside world, a technique used in fault-tolerant systems.

examples

[root@server3 mysql]# mysql -pEnter password: ##Initialize password mysql> alter user root@localhost identified by 'Wsp+123ld'; ##Modify password Query OK, 0 rows affected (0.02 sec)mysql> show databases; mysql> SET SQL_LOG_BIN=0; #Disable binary logging mysql> CREATE USER rpl_user@'%' IDENTIFIED BY 'Wsp+123ld'; #Create user mysql> GRANT RESOLUTION SLAVE ON *.* TO rpl_user @'%'; ##add user privileges mysql> FLUSH PRIVILEGES; ##brush data mysql> SET SQL_LOG_BIN=1; #Enable binary logging ##Once the user is configured, use the CHANGE MASTER TO statement to configure the server to replicate the given credentials of the channel using group_replication_recovery the next time you need to recover state from other members. Issue the following command to replace rpl_user and password with the values used when creating the user. mysql> CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='Wsp+123ld' FOR CHANNEL 'group_replication_recovery';mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so'; #Install the group replication plug-in mysql> SET GLOBAL group_replication_bootstrap_group=ON; ##Open it first on master, and then open it after group replication is opened (do not do it on slave) mysql> START GROUP_REPLICATION; ##Open group replication mysql> SET GLOBAL group_replication_bootstrap_group=OFF; View the status, show ONLINE then open successfully Thank you for reading, the above is the "mysql group replication instructions and example usage" content, after learning this article, I believe that everyone has a deeper understanding of mysql group replication instructions and example usage, 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!

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

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report