Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does mysql start group replication

Shulou Source: shulou.com Published: 2022-05-31 10:54:14 09月23日 Update

Today, the editor will share with you the relevant knowledge points about how to start mysql replication. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

1. Create a replication user.

Create user 'repl'@'%' identified with' mysql_native_password' by '123456 grant replication slave on *. * to' repl'@'%'

2. Configure replication channels for asynchronous replication between new members and donors.

Change master to master_user='repl', master_password='123456' for channel 'group_replication_recovery'

3. You need to instruct server S1 to boot the group, and then start group replication.

This bootstrap should be done by only one server, and the server startup group should be executed only once.

Set global group_replication_bootstrap_group=on;start group_replication;set global group_replication_bootstrap_group=off

4. Confirm whether the group replication started successfully.

When the STARTGROUP_REPLICATION statement returns, the group has already started. You can check whether the group is currently created and include a member.

Mysql > select * from performance_schema.replication_group_members +- -CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | +-+ -+-+ | group_replication_applier | 8eed0f5b-6f9b-11e9-94a9-005056a57a4e | hdp2 | 3306 | ONLINE | | PRIMARY | 8.0.16 | +-- + -+ 1 row in set (0.00 sec) above is all the content of the article "how does mysql start group replication?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Knowledge articles servers services content members different great successful between most that is instructions donors more channels users knowledge points programs industries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Redmi Docker OPPO Reno vpn