diff --git a/mariadb/templates/bin/_readiness.sh.tpl b/mariadb/templates/bin/_readiness.sh.tpl index 86f513e21..e35c5a1a5 100644 --- a/mariadb/templates/bin/_readiness.sh.tpl +++ b/mariadb/templates/bin/_readiness.sh.tpl @@ -45,8 +45,3 @@ if [ "x$(mysql_status_query wsrep_local_state_comment)" != "xSynced" ]; then # WSREP not synced exit 1 fi - -# If we made it this far, its safe to remove the bootstrap file if present -if [ -e ${BOOTSTRAP_FILE} ]; then - rm -f ${BOOTSTRAP_FILE} -fi diff --git a/mariadb/templates/bin/_start.sh.tpl b/mariadb/templates/bin/_start.sh.tpl index 6920a9af2..a0c41d6bf 100644 --- a/mariadb/templates/bin/_start.sh.tpl +++ b/mariadb/templates/bin/_start.sh.tpl @@ -180,9 +180,11 @@ CREATE OR REPLACE USER 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ; GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ; DROP DATABASE IF EXISTS test ; FLUSH PRIVILEGES ; +SHUTDOWN ; EOF - CLUSTER_INIT_ARGS="${CLUSTER_INIT_ARGS} --init-file=${BOOTSTRAP_FILE}" + mysqld ${CLUSTER_INIT_ARGS} --bind-address=127.0.0.1 --init-file=${BOOTSTRAP_FILE} + rm -f "${BOOTSTRAP_FILE}" fi exec mysqld ${CLUSTER_INIT_ARGS}