Get the App
SLTechnology News&Howtos  ›  Development  › 

How does mysql create replication users and start group replication

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

This article introduces the knowledge of "how to create replication users and start-up group replication by mysql". In the operation of actual cases, many people will encounter such a dilemma, 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!

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) "how mysql creates replication users and initiates group replication" ends here. Thank you for your 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: Users servers services content members more knowledge practicality success learning and then between dilemmas realities situations instructions donors articles cases channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi macOS Shulou Technology Xiaomi Shulou Tech Info