@@ -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} "
@@ -188,8 +186,9 @@ loose-group_replication_ssl_mode = REQUIRED
188186loose-group_replication_recovery_use_ssl = 1
189187
190188# recommended config
191- innodb_buffer_pool_size = "${innodb_buffer_pool_size} "
192- loose-group-replication-message-cache-size = "${group_replication_message_cache_size} "
189+ innodb_buffer_pool_size = "$INNODB_BUFFER_POOL_SIZE "
190+ loose-group-replication-message-cache-size = "$GROUP_REPLICATION_MESSAGE_CACHE_SIZE "
191+ binlog_expire_logs_seconds = "$BINLOG_EXPIRE_LOGS_SECONDS "
193192
194193# Shared replication group configuration
195194loose-group_replication_group_name = "${GROUP_NAME} "
@@ -216,14 +215,6 @@ socket="/var/run/mysqld/mysqld.sock"
216215EOL
217216fi
218217
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-
227218# wait for mysql daemon be running (alive)
228219function wait_for_mysqld_running() {
229220 local mysql=" $mysql_header --host=$localhost "
0 commit comments