aboutsummaryrefslogtreecommitdiffstats
path: root/policy-db-migrator
diff options
context:
space:
mode:
Diffstat (limited to 'policy-db-migrator')
-rwxr-xr-xpolicy-db-migrator/src/main/docker/db-migrator6
1 files changed, 5 insertions, 1 deletions
diff --git a/policy-db-migrator/src/main/docker/db-migrator b/policy-db-migrator/src/main/docker/db-migrator
index 565ff1c4..3a4ccfa0 100755
--- a/policy-db-migrator/src/main/docker/db-migrator
+++ b/policy-db-migrator/src/main/docker/db-migrator
@@ -621,7 +621,11 @@ if [ -z "${SQL_HOST}" ] || [ -z "${SQL_USER}" ] || [ -z "${SQL_PASSWORD}" ]; the
exit 4
fi
-MYSQL="mysql -u${SQL_USER} -p${SQL_PASSWORD} -h ${SQL_HOST}"
+if [ -z "$MYSQL_CMD" ]; then
+ MYSQL_CMD="mysql"
+fi
+
+MYSQL="${MYSQL_CMD} -u${SQL_USER} -p${SQL_PASSWORD} -h ${SQL_HOST}"
if ! ${MYSQL} -h"${SQL_HOST}" --execute "show databases;" >/dev/null 2>&1; then
echo "error: No DB connectivity to ${SQL_HOST} for ${SQL_USER}"
exit 5