MariaDB: init server accounts before serving externally
This PS updates the server init process to init desired accounts before serving external requests. Change-Id: Ida9e3b93ed332a621e0c2fcb39a9870886c9ffe7 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
551be3f0dc
commit
6b2d66354d
mariadb/templates/bin
@ -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
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user