Changes between Version 1 and Version 2 of GROUPReplicate2


Ignore:
Timestamp:
06/12/22 04:33:36 (2 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUPReplicate2

    v1 v2  
    1313}}}
    1414
    15 3.
     153. download mysql-8.0.11 from [https://downloads.mysql.com/archives/community/ here] select '''Linux - Generic (glibc 2.12) (x86, 64-bit), TAR'''. Then unzip and place in folder. In this test, we put in /home/ubuntu/GR_2/mysql-8.0.11.  We '''start.sh''' script in this attach file.
     16{{{
     17$ chmod -R 777 /home/ubuntu/GR_2/mysql-8.0.11
     18$ ./start.sh
     19}}}
     20
     214. access to node1 with
     22{{{
     23$ docker exec -it node1 ./bin/mysql -uroot --socket=/tmp/mysql.0.sock
     24}}}
     25
     265. set node1 as primary node
     27{{{
     28create user 'repl'@'%';
     29GRANT ALL  ON * . * TO repl@'%';
     30flush privileges;
     31SET @@GLOBAL.group_replication_group_name='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';
     32SET @@GLOBAL.group_replication_local_address='node1:6606';
     33SET @@GLOBAL.group_replication_group_seeds='node1:6606,node2:6606,node3:6606';
     34SET @@GLOBAL.group_replication_bootstrap_group=1;
     35change master to master_user='repl' for channel 'group_replication_recovery';
     36START GROUP_REPLICATION;
     37SET @@GLOBAL.group_replication_bootstrap_group=0;
     38SELECT * FROM performance_schema.replication_group_members;
     39}}}
     40
     416. start node2 with '''./start.sh''', pls make change on  --name node2, --hostname node2, -e DATADIR="d2", -e SERVERID=2. Then, exec on node2
     42{{{
     43$ docker exec -it node2 ./bin/mysql -uroot --socket=/tmp/mysql.0.sock
     44}}}
     45
     467. set group replicate on node2
     47{{{
     48SET @@GLOBAL.group_replication_group_name='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';
     49SET @@GLOBAL.group_replication_local_address='node2:6606';
     50SET @@GLOBAL.group_replication_group_seeds='node1:6606,node2:6606,node3:6606';
     51SET @@GLOBAL.group_replication_bootstrap_group=0;
     52SET @@global.group_replication_recovery_retry_count=5;
     53change master to master_user='repl' for channel 'group_replication_recovery';
     54START GROUP_REPLICATION;
     55SELECT * FROM performance_schema.replication_group_members;
     56}}}
     57
     588. start node3 same as in step 6, 7, then set group replicate on node3
     59{{{
     60SET @@GLOBAL.group_replication_group_name='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';
     61SET @@GLOBAL.group_replication_local_address='node3:6606';
     62SET @@GLOBAL.group_replication_group_seeds='node1:6606,node2:6606,node3:6606';
     63SET @@GLOBAL.group_replication_bootstrap_group=0;
     64SET @@global.group_replication_recovery_retry_count=5;
     65change master to master_user='repl' for channel 'group_replication_recovery';
     66START GROUP_REPLICATION;
     67SELECT * FROM performance_schema.replication_group_members;
     68}}}