Rate This Document
Findability
Accuracy
Completeness
Readability

Setting MGR Parameters

This section uses the three members mysql-1, mysql-2, and mysql-3 as an example to describe how to create an MGR group.

  1. Add the following parameter settings to the parameter file of member 1 (mysql-1). You can directly modify the /data/mysql/mysql_1/mysql_arm.cnf file of the physical machine where the mysql-1 pod is located.
    ssl=0
    table_open_cache=30000
    max_connect_errors=2000
    innodb_adaptive_hash_index=0
    ## Disable other storage engines.
    disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
    server_id=1
    gtid_mode=ON
    enforce_gtid_consistency=ON
    binlog_checksum=NONE
    log_bin=binlog
    log_slave_updates=ON
    binlog_format=ROW
    master_info_repository=TABLE
    relay_log_info_repository=TABLE
    transaction_write_set_extraction=XXHASH64
    plugin_load_add='group_replication.so' 
    group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" 
    group_replication_start_on_boot=off 
    group_replication_local_address= "10.99.0.15:33061" 
    group_replication_group_seeds= "10.99.0.15:33061,10.99.0.16:33061,10.99.0.17:33061" 
    Table 1 Parameter description

    Parameter

    Description

    server_id

    Each group member has its own server ID.

    plugin_load_add

    The engine specified by this parameter is loaded when the server is started.

    group_replication_group_name

    Group name for group replication

    group_replication_start_on_boot

    After the MySQL service is started, the engine does not automatically start. After all group members are configured, you can set this parameter to on.

    group_replication_local_address

    IP address and port number of the local host. The value of this parameter is used only for interaction with the group communication engine and cannot be the same as the IP address and port number for connecting to the client. In versions later than 8.0.14, an IPv6 address can be used.

    group_replication_group_seeds

    Addresses and ports of all group members

  2. Add the following parameter settings to the parameter file of member 2 (mysql-2). You can directly modify /data/mysql/mysql_2/mysql_arm.cnf on the physical machine where the mysql-2 pod is located.
    ssl=0
    table_open_cache=30000
    max_connect_errors=2000
    innodb_adaptive_hash_index=0
    ## Disable other storage engines.
    disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
    server_id=2
    gtid_mode=ON
    enforce_gtid_consistency=ON
    binlog_checksum=NONE
    log_bin=binlog
    log_slave_updates=ON
    binlog_format=ROW
    master_info_repository=TABLE
    relay_log_info_repository=TABLE
    transaction_write_set_extraction=XXHASH64
    plugin_load_add='group_replication.so' 
    group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" 
    group_replication_start_on_boot=off 
    group_replication_local_address= "10.99.0.16:33061" 
    group_replication_group_seeds= "10.99.0.15:33061,10.99.0.16:33061,10.99.0.17:33061" 
    Table 2 Parameter description

    Parameter

    Description

    server_id

    Each group member has its own server ID.

    plugin_load_add

    The engine specified by this parameter is loaded when the server is started.

    group_replication_group_name

    Group name for group replication

    group_replication_start_on_boot

    After the MySQL service is started, the engine does not automatically start. After all group members are configured, you can set this parameter to on.

    group_replication_local_address

    IP address and port number of the local host. The value of this parameter is used only for interaction with the group communication engine and cannot be the same as the IP address and port number for connecting to the client. In versions later than 8.0.14, an IPv6 address can be used.

    group_replication_group_seeds

    Addresses and ports of all group members

  3. Add the following parameter settings to the parameter file of member 3 (mysql-3). You can directly modify /data/mysql/mysql_3/mysql_arm.cnf on the physical machine where the mysql-3 pod is located.
    ssl=0
    table_open_cache=30000
    max_connect_errors=2000
    innodb_adaptive_hash_index=0
    ## Disable other storage engines.
    disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY"
    server_id=3 
    gtid_mode=ON
    enforce_gtid_consistency=ON
    binlog_checksum=NONE
    log_bin=binlog
    log_slave_updates=ON
    binlog_format=ROW
    master_info_repository=TABLE
    relay_log_info_repository=TABLE
    transaction_write_set_extraction=XXHASH64
    plugin_load_add='group_replication.so' 
    group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" 
    group_replication_start_on_boot=off 
    group_replication_local_address= "10.99.0.17:33061" 
    group_replication_group_seeds= "10.99.0.15:33061,10.99.0.16:33061,10.99.0.17:33061"
    Table 3 Parameter description

    Parameter

    Description

    server_id

    Each group member has its own server ID.

    plugin_load_add

    The engine specified by this parameter is loaded when the server is started.

    group_replication_group_name

    Group name for group replication

    group_replication_start_on_boot

    After the MySQL service is started, the engine does not automatically start. After all group members are configured, you can set this parameter to on.

    group_replication_local_address

    IP address and port number of the local host. The value of this parameter is used only for interaction with the group communication engine and cannot be the same as the IP address and port number for connecting to the client. In versions later than 8.0.14, an IPv6 address can be used.

    group_replication_group_seeds

    Addresses and ports of all group members