diff --git a/utils/helpers.sh b/utils/helpers.sh
index ec1ce8694cd54ed3982c7dd6452f5d68f724a009..6adb318503e26061369a1144568dea4f60ef3d46 100644
--- a/utils/helpers.sh
+++ b/utils/helpers.sh
@@ -44,13 +44,12 @@ function mysql_execute {
 
 # Takes a filename with commands instead of command line arguments
 function mysql_execute_file {
-	set +e
-	$CMD_MYSQL $MYSQL_CONNECTION < "$1"
+	set -e
+	$MYSQL_CMD $(get_db_args) < "$1"
 	ret=${PIPESTATUS[0]}
 	if [ "$ret" -ne 0 ]; then
 		failure "MYSQL ERROR"
 	fi
-	set -e
 }