summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-06-21 10:24:40 +0300
committerunknown <monty@mysql.com>2004-06-21 10:24:40 +0300
commit028dfdb3f723aed827475fe4ddcc9377f7805567 (patch)
tree0e02d42f7a1f1f532c1d780d1c57097202d7369d /scripts
parenta3c22ae7d2d719e6e4ba052056c1dba316390985 (diff)
parentb5dfd05662464d2c19da349942914cce897cdbaf (diff)
downloadmariadb-git-028dfdb3f723aed827475fe4ddcc9377f7805567.tar.gz
merge
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union Build-tools/Do-compile: Auto merged include/my_global.h: Auto merged innobase/row/row0ins.c: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/subselect.result: Auto merged scripts/mysql_install_db.sh: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged innobase/fil/fil0fil.c: merge (Use heikki's code)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh11
-rw-r--r--scripts/mysqld_safe.sh8
2 files changed, 11 insertions, 8 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 1fd67b1d0ee..558b0e2da0c 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -10,6 +10,7 @@
in_rpm=0
windows=0
defaults=""
+user=""
tmp_file=/tmp/mysql_install_db.$$
case "$1" in
@@ -34,7 +35,11 @@ parse_arguments() {
--force) force=1 ;;
--basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
- --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --user=*)
+ # Note that the user will be passed to mysqld so that it runs
+ # as 'user' (crucial e.g. if log-bin=/some_other_path/
+ # where a chown of datadir won't help)
+ user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--skip-name-resolve) ip_only=1 ;;
--verbose) verbose=1 ;;
--rpm) in_rpm=1 ;;
@@ -198,6 +203,10 @@ else
create_option="real"
fi
+if test -n "$user"; then
+ args="$args --user=$user"
+fi
+
if test "$in_rpm" -eq 0 -a "$windows" -eq 0
then
echo "Installing all prepared tables"
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 779438e75c3..7b77bf449cd 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -43,13 +43,7 @@ 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=*)
- if test $SET_USER -eq 0
- then
- user=`echo "$arg" | sed -e "s;--[^=]*=;;"`
- fi
- SET_USER=1
- ;;
+ --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;;
# these two might have been set in a [mysqld_safe] section of my.cnf
# they are added to mysqld command line to override settings from my.cnf