summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 3ccf5301503..bc29ac1c555 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -38,7 +38,12 @@ parse_arguments() {
--basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--basedir=;;"` ;;
--datadir=*) DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"` ;;
--pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;;
- --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;;
+ --user=*)
+ if [ $SET_USER == 0 ]
+ then
+ user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1
+ fi
+ ;;
# these two might have been set in a [mysqld_safe] section of my.cnf
# they get passed via environment variables to mysqld_safe