Merge "MariaDB: init server accounts before serving externally"

This commit is contained in:
Zuul 2018-10-01 17:55:16 +00:00 committed by Gerrit Code Review
commit b800169a17
2 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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}