@@ -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
@@ -143,8 +140,9 @@ loose-group_replication_ssl_mode = REQUIRED
143140loose-group_replication_recovery_use_ssl = 1
144141
145142# recommended config
146- innodb_buffer_pool_size = "${innodb_buffer_pool_size} "
147- loose-group-replication-message-cache-size = "${group_replication_message_cache_size} "
143+ innodb_buffer_pool_size = "$INNODB_BUFFER_POOL_SIZE "
144+ loose-group-replication-message-cache-size = "$GROUP_REPLICATION_MESSAGE_CACHE_SIZE "
145+ binlog_expire_logs_seconds = "$BINLOG_EXPIRE_LOGS_SECONDS "
148146
149147# Shared replication group configuration
150148loose-group_replication_group_name = "${GROUP_NAME} "
@@ -189,8 +187,9 @@ loose-group_replication_ssl_mode = REQUIRED
189187loose-group_replication_recovery_use_ssl = 1
190188
191189# recommended config
192- innodb_buffer_pool_size = "${innodb_buffer_pool_size} "
193- loose-group-replication-message-cache-size = "${group_replication_message_cache_size} "
190+ innodb_buffer_pool_size = "$INNODB_BUFFER_POOL_SIZE "
191+ loose-group-replication-message-cache-size = "$GROUP_REPLICATION_MESSAGE_CACHE_SIZE "
192+ binlog_expire_logs_seconds = "$BINLOG_EXPIRE_LOGS_SECONDS "
194193
195194# Shared replication group configuration
196195loose-group_replication_group_name = "${GROUP_NAME} "
@@ -217,13 +216,6 @@ socket="/var/run/mysqld/mysqld.sock"
217216EOL
218217fi
219218
220- # recommended config
221- if [ -v BINLOG_EXPIRE_LOGS_SECONDS ]; then
222- cat >> /etc/mysql/group-replication.conf.d/group.cnf << EOL
223- binlog_expire_logs_seconds = "$BINLOG_EXPIRE_LOGS_SECONDS "
224- EOL
225- fi
226-
227219# wait for mysql daemon be running (alive)
228220function wait_for_mysqld_running() {
229221 local mysql=" $mysql_header --host=$localhost "
0 commit comments