Search code examples
master-slavemysql-group-replication

group replication vs master-slave replication


I want to know how can we differ master-slave replication and group-replication on a server.

will secondary server act as slave in mysql group replication? if yes, why show slave status on group replication member returns empty set.


Solution

    1. The main difference b/w group replication and master-slave replication is Group replication has auto fail-over mechanism.

    if a primary down then secondary become primary but in master-slave replication, we have to do it manually.

    1. Yes secondary server act as a Slave in GR, it is for read-only purpose.

    2. GR has a different command to see if all member in GR is synced with primary

      you can check here member state and member role

    mysql> SELECT * FROM performance_schema.replication_group_members;
    
    
    | CHANNEL_NAME                                      |MEMBER_ID|MEMBER_HOST|MEMBER_PORT | MEMBER_STATE|MEMBER_ROLE
      |group_replication_applier   | ce9be252 |  myhost1      |  24801         | **ONLINE      |Primary**
    
    |group_replication_applier     | jk45ty45 |  myhost2        | 24801      | **ONLINE      |Secondary**