diff --git a/devTools/docker/refresh-grapher-data.sh b/devTools/docker/refresh-grapher-data.sh index 4f954f1890a..c00f37f285a 100755 --- a/devTools/docker/refresh-grapher-data.sh +++ b/devTools/docker/refresh-grapher-data.sh @@ -12,7 +12,11 @@ set -x : "${DATA_FOLDER:?Need to set DATA_FOLDER non-empty}" _mysql() { - mysql --default-character-set=utf8mb4 -h"$GRAPHER_DB_HOST" -u"$GRAPHER_DB_USER" -p"$GRAPHER_DB_PASS" -P "${GRAPHER_DB_PORT}" "$@" + if [ -z "$GRAPHER_DB_PASS" ]; then + mysql --default-character-set=utf8mb4 -h"$GRAPHER_DB_HOST" -u"$GRAPHER_DB_USER" -P "${GRAPHER_DB_PORT}" "$@" + else + mysql --default-character-set=utf8mb4 -h"$GRAPHER_DB_HOST" -u"$GRAPHER_DB_USER" -p"$GRAPHER_DB_PASS" -P "${GRAPHER_DB_PORT}" "$@" + fi } import_db() {