Improved password usage in MySQL tools

This commit is contained in:
root
2020-09-08 21:46:03 +03:00
parent e211ab5cf4
commit 01fe85c395
3 changed files with 33 additions and 7 deletions

View File

@ -214,11 +214,15 @@ check_db_connect() {
ssl_opts="$(db_tls_params)"
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 $ssl_opts)" ]; do
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
sleep $WAIT_TIMEOUT
done
unset MYSQL_PWD
}
prepare_web_server() {