@@ -112,9 +112,6 @@ if [ -z "$whitelist" ]; then
112112 fi
113113fi
114114
115- innodb_buffer_pool_size=" $INNODB_BUFFER_POOL_SIZE "
116- group_replication_message_cache_size=" $GROUP_REPLICATION_MESSAGE_CACHE_SIZE "
117-
118115# the mysqld configurations have take by following
119116# 01. official doc: https://dev.mysql.com/doc/refman/5.7/en/group-replication-configuring-instances.html
120117# 02. digitalocean doc: https://www.digitalocean.com/community/tutorials/how-to-configure-mysql-group-replication-on-ubuntu-16-04
@@ -136,15 +133,15 @@ log_bin = binlog
136133loose-group_replication_bootstrap_group = OFF
137134loose-group_replication_start_on_boot = OFF
138135
139-
140136# default tls configuration for the group
141137# group_replication_recovery_use_ssl will be overwritten from DB arguments
142138loose-group_replication_ssl_mode = REQUIRED
143139loose-group_replication_recovery_use_ssl = 1
144140
145141# recommended config
146- innodb_buffer_pool_size = "${innodb_buffer_pool_size} "
147- loose-group-replication-message-cache-size = "${group_replication_message_cache_size} "
142+ innodb_buffer_pool_size = "$INNODB_BUFFER_POOL_SIZE "
143+ loose-group-replication-message-cache-size = "$GROUP_REPLICATION_MESSAGE_CACHE_SIZE "
144+ binlog_expire_logs_seconds = "$BINLOG_EXPIRE_LOGS_SECONDS "
148145
149146# Shared replication group configuration
150147loose-group_replication_group_name = "${GROUP_NAME} "
@@ -188,8 +185,9 @@ loose-group_replication_ssl_mode = REQUIRED
188185loose-group_replication_recovery_use_ssl = 1
189186
190187# recommended config
191- innodb_buffer_pool_size = "${innodb_buffer_pool_size} "
192- loose-group-replication-message-cache-size = "${group_replication_message_cache_size} "
188+ innodb_buffer_pool_size = "$INNODB_BUFFER_POOL_SIZE "
189+ loose-group-replication-message-cache-size = "$GROUP_REPLICATION_MESSAGE_CACHE_SIZE "
190+ binlog_expire_logs_seconds = "$BINLOG_EXPIRE_LOGS_SECONDS "
193191
194192# Shared replication group configuration
195193loose-group_replication_group_name = "${GROUP_NAME} "
@@ -216,14 +214,6 @@ socket="/var/run/mysqld/mysqld.sock"
216214EOL
217215fi
218216
219- # recommended config
220- if [ -v BINLOG_EXPIRE_LOGS_SECONDS ]; then
221- cat >> /etc/mysql/group-replication.conf.d/group.cnf << EOL
222- binlog_expire_logs_seconds = "$BINLOG_EXPIRE_LOGS_SECONDS "
223- EOL
224- fi
225-
226-
227217# wait for mysql daemon be running (alive)
228218function wait_for_mysqld_running() {
229219 local mysql=" $mysql_header --host=$localhost "
0 commit comments