Improved password usage in MySQL tools

This commit is contained in:
Alexey Pustovalov
2020-09-08 15:40:14 -04:00
parent a61356ea43
commit 9af188f2f6
12 changed files with 119 additions and 23 deletions

View File

@ -171,11 +171,15 @@ check_db_connect() {
WAIT_TIMEOUT=5
export MYSQL_PWD="${DB_SERVER_ROOT_PASS}"
while [ ! "$(mysqladmin ping -h ${DB_SERVER_HOST} -P ${DB_SERVER_PORT} -u ${DB_SERVER_ROOT_USER} \
--password="${DB_SERVER_ROOT_PASS}" --silent --connect_timeout=10)" ]; do
--silent --connect_timeout=10)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
sleep $WAIT_TIMEOUT
done
unset MYSQL_PWD
}
prepare_web_server() {