summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <jani@prima.mysql.fi>2000-12-08 14:35:54 +0200
committerunknown <jani@prima.mysql.fi>2000-12-08 14:35:54 +0200
commit3a62f018f33690b787ed802f7697c17ab4c08288 (patch)
treee644b45eafdc8fc225bbaec59bf8c85e93889718 /scripts
parentf643a700a3118295c12368d77fa8c1b6b1e5dfd2 (diff)
downloadmariadb-git-3a62f018f33690b787ed802f7697c17ab4c08288.tar.gz
Small changes in mysqld_multi.
scripts/mysqld_multi.sh: Small changes and bug fixes.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mysqld_multi.sh31
1 files changed, 17 insertions, 14 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index d96828cee4d..cd8609d9409 100755
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -1,10 +1,10 @@
-#!@PERL@
+#!/usr/bin/perl
use Getopt::Long;
use POSIX qw(strftime);
$|=1;
-$VER="2.1";
+$VER="2.2";
$opt_config_file = undef();
$opt_example = 0;
@@ -134,12 +134,13 @@ sub report_mysqlds
@options = `$com`;
chop @options;
- $com = "$mysqladmin -u $opt_user -p$opt_password";
+ $com = "$mysqladmin -u $opt_user";
+ $com.= defined($opt_password) ? " -p$opt_password" : "";
$com.= $opt_tcp_ip ? " -h 127.0.0.1" : "";
for ($j = 0; defined($options[$j]); $j++)
{
- if ((($options[$j] =~ m/^(\-\-socket)(.*)$/) && !$opt_tcp_ip) ||
- ($options[$j] =~ m/^(\-\-port)(.*)$/))
+ if ((($options[$j] =~ m/^(\-\-socket\=)(.*)$/) && !$opt_tcp_ip) ||
+ ($options[$j] =~ m/^(\-\-port\=)(.*)$/))
{
$com.= " $options[$j]";
}
@@ -242,12 +243,13 @@ sub stop_mysqlds()
@options = `$com`;
chop @options;
- $com = "$mysqladmin -u $opt_user -p$opt_password";
+ $com = "$mysqladmin -u $opt_user";
+ $com.= defined($opt_password) ? " -p$opt_password" : "";
$com.= $opt_tcp_ip ? " -h 127.0.0.1" : "";
for ($j = 0; defined($options[$j]); $j++)
{
- if ((($options[$j] =~ m/^(\-\-socket)(.*)$/) && !$opt_tcp_ip) ||
- ($options[$j] =~ m/^(\-\-port)(.*)$/))
+ if ((($options[$j] =~ m/^(\-\-socket\=)(.*)$/) && !$opt_tcp_ip) ||
+ ($options[$j] =~ m/^(\-\-port\=)(.*)$/))
{
$com.= " $options[$j]";
}
@@ -461,8 +463,10 @@ sub example
# safe_mysqld 'guards' every mysqld process and will restart it, if mysqld
# process fails due to signal kill -9, or similar. (Like segmentation fault,
# which MySQL should never do, of course ;) Please note that safe_mysqld
-# script may require that you start it from a certain place. If you have
-# problems starting, please see the script. Check especially the lines:
+# script may require that you start it from a certain place. This means that
+# you may have to CD to a certain directory, before you start the
+# mysqld_multi. If you have problems starting, please see the script.
+# Check especially the lines:
# --------------------------------------------------------------------------
# MY_PWD=`pwd`
# Check if we are starting this relative (for the binary release)
@@ -482,16 +486,15 @@ sub example
# 7.You may want to use option '--user' for mysqld, but in order to do this
# you need to be root when you start this script. Having the option
# in the config file doesn't matter; you will just get a warning, if you are
-# no the superuser and the mysqld's are started under *your* unix account.
-# IMPORTANT: Make sure that the pid-file and the data directory is
+# not the superuser and the mysqlds are started under *your* unix account.
+# IMPORTANT: Make sure that the pid-file and the data directory are
# read+write(+execute for the latter one) accessible for *THAT* UNIX user,
# who the specific mysqld process is started as. *DON'T* use the UNIX root
# account for this, unless you *KNOW* what you are doing!
# 8.MOST IMPORTANT: Make sure that you understand the meanings of the options
# that are passed to the mysqlds and why *WOULD YOU WANT* to have separate
# mysqld processes. Starting multiple mysqlds in one data directory *WON'T*
-# give you extra performance in a threaded system! It takes too much space
-# to describe everything here, please consult the MySQL manual.
+# give you extra performance in a threaded system!
#
[mysqld_multi]
mysqld = /usr/local/bin/safe_mysqld