summaryrefslogtreecommitdiff
path: root/scripts/mysqld_safe.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r--scripts/mysqld_safe.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 20e5e115687..aaf1936afe1 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -15,6 +15,7 @@
KILL_MYSQLD=1;
MYSQLD=
niceness=0
+nowatch=0
mysqld_ld_preload=
mysqld_ld_library_path=
@@ -44,16 +45,18 @@ usage () {
cat <<EOF
Usage: $0 [OPTIONS]
--no-defaults Don't read the system defaults file
+ --core-file-size=LIMIT Limit core files to the specified size
--defaults-file=FILE Use the specified defaults file
--defaults-extra-file=FILE Also use defaults from the specified file
--ledir=DIRECTORY Look for mysqld in the specified directory
--open-files-limit=LIMIT Limit the number of open files
- --core-file-size=LIMIT Limit core files to the specified size
--timezone=TZ Set the system timezone
--malloc-lib=LIB Preload shared library LIB if available
--mysqld=FILE Use the specified file as mysqld
--mysqld-version=VERSION Use "mysqld-VERSION" as mysqld
--nice=NICE Set the scheduling priority of mysqld
+ --no-auto-restart Exit after starting mysqld
+ --nowatch Exit after starting mysqld
--plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if
VERSION is given
--skip-kill-mysqld Don't try to kill stray mysqld processes
@@ -140,8 +143,16 @@ eval_log_error () {
;;
esac
- #echo "Running mysqld: [$cmd]"
- eval "$cmd"
+ if test $nowatch -eq 1
+ then
+ # We'd prefer to exec $cmd here, but SELinux needs to be fixed first
+ #/usr/bin/logger "Running mysqld: $cmd"
+ eval "$cmd &"
+ exit 0
+ else
+ #echo "Running mysqld: [$cmd]"
+ eval "$cmd"
+ fi
}
shell_quote_string() {
@@ -202,6 +213,7 @@ parse_arguments() {
fi
;;
--nice=*) niceness="$val" ;;
+ --nowatch|--no-watch|--no-auto-restart) nowatch=1 ;;
--open-files-limit=*) open_files="$val" ;;
--open_files_limit=*) open_files="$val" ;;
--skip-kill-mysqld*) KILL_MYSQLD=0 ;;