Changes between Version 4 and Version 5 of GROUPReplicate


Ignore:
Timestamp:
06/11/22 02:33:46 (2 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUPReplicate

    v4 v5  
    3333}}}
    3434
    35 4. On master node
     354. On master node1, in command pls change '''node1''' to docker id ex. 26b55aaad407 which can be checked with '''docker ps''' on swarm node n3
     36{{{
     37docker exec -it node1 mysql -uroot -pmypass \
     38  -e "SET @@GLOBAL.group_replication_bootstrap_group=1;" \
     39  -e "create user 'repl'@'%';" \
     40  -e "GRANT REPLICATION SLAVE ON *.* TO repl@'%';" \
     41  -e "flush privileges;" \
     42  -e "change master to master_user='repl' for channel 'group_replication_recovery';" \
     43  -e "START GROUP_REPLICATION;" \
     44  -e "SET @@GLOBAL.group_replication_bootstrap_group=0;" \
     45  -e "SELECT * FROM performance_schema.replication_group_members;"
     46}}}
     47
     485. On replicate node2, node3, pls change '''node2''' to docker id ex. ac87f41b140c which can be checked with '''docker ps''' on swarm node n1, n2
     49{{{
     50root@n1:/home/ubuntu/GR# docker exec -it ac87f41b140c mysql -uroot -pmypass \
     51   -e "change master to master_user='repl' for channel 'group_replication_recovery';" \
     52   -e "START GROUP_REPLICATION;"
     53}}}
     54We also do above command with node3 (replicate node)
     55
     566. Check all nodes status on node1
     57{{{
     58root@n3:/home/ubuntu# docker exec -it 26 mysql -uroot -pmypass   -e "SELECT * FROM performance_schema.replication_group_members;"
     59mysql: [Warning] Using a password on the command line interface can be insecure.
     60+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+----------------------------+
     61| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
     62+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+----------------------------+
     63| group_replication_applier | 852f597b-e92c-11ec-9238-02420a000b03 | node2       |        3306 | ONLINE       | SECONDARY   | 8.0.29         | XCom                       |
     64| group_replication_applier | 89a10b8c-e92c-11ec-9362-02420a000b06 | node3       |        3306 | ONLINE       | SECONDARY   | 8.0.29         | XCom                       |
     65| group_replication_applier | 8ef43b09-e92c-11ec-936c-02420a000b09 | node1       |        3306 | ONLINE       | PRIMARY     | 8.0.29         | XCom                       |
     66+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+----------------------------+
     67root@n3:/home/ubuntu#
     68}}}