summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/mysqld_multi.sh19
-rw-r--r--support-files/mysqld_multi.server.sh38
2 files changed, 55 insertions, 2 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 1e8a8ecb88e..229cb9015f4 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -81,6 +81,12 @@ sub main
"silent","verbose")
|| die "Wrong option! See $my_progname --help for detailed information!\n";
+ if ($opt_verbose && $opt_silent)
+ {
+ print "Both --verbose and --silent has been given. Some of the warnings ";
+ print "will be disabled\nand some will be enabled.\n\n";
+ }
+
init_log() if (!defined($opt_log));
$groupids = $ARGV[1];
if ($opt_version)
@@ -247,7 +253,7 @@ sub report_mysqlds
sub start_mysqlds()
{
- my (@groups, $com, $tmp, $i, @options, $j, $mysqld_found);
+ my (@groups, $com, $tmp, $i, @options, $j, $mysqld_found, $info_sent);
if (!$opt_no_log)
{
@@ -287,6 +293,15 @@ sub start_mysqlds()
$tmp.= " $options[$j]";
}
}
+ if ($opt_verbose && $com =~ m/\/safe_mysqld$/ && !$info_sent)
+ {
+ print "WARNING: safe_mysqld is being used to start mysqld. In this case you ";
+ print "may need to pass\n\"ledir=...\" under groups [mysqldN] to ";
+ print "safe_mysqld in order to find the actual mysqld binary.\n";
+ print "ledir (library executable directory) should be the path to the ";
+ print "wanted mysqld binary.\n\n";
+ $info_sent= 1;
+ }
$com.= $tmp;
$com.= " >> $opt_log 2>&1" if (!$opt_no_log);
$com.= " &";
@@ -724,13 +739,13 @@ Options:
file is turned on.
--password=... Password for user for mysqladmin.
--silent Disable warnings.
---verbose Be more verbose.
--tcp-ip Connect to the MySQL server(s) via the TCP/IP port instead
of the UNIX socket. This affects stopping and reporting.
If a socket file is missing, the server may still be
running, but can be accessed only via the TCP/IP port.
By default connecting is done via the UNIX socket.
--user=... MySQL user for mysqladmin. Using: $opt_user
+--verbose Be more verbose.
--version Print the version number and exit.
EOF
exit(0);
diff --git a/support-files/mysqld_multi.server.sh b/support-files/mysqld_multi.server.sh
new file mode 100644
index 00000000000..ca453428216
--- /dev/null
+++ b/support-files/mysqld_multi.server.sh
@@ -0,0 +1,38 @@
+#! /bin/sh
+#
+# A simple startup script for mysqld_multi by Tim Smith and Jani Tolonen.
+# This script assumes that my.cnf file exists either in /etc/my.cnf or
+# /root/.my.cnf and has groups [mysqld_multi] and [mysqldN]. See the
+# mysqld_multi documentation for detailed instructions.
+#
+# This script can be used as /etc/init.d/mysql.server
+#
+
+basedir=/usr/local/mysql
+bindir=/usr/local/mysql/bin
+
+if test -x $bindir/mysqld_multi
+then
+ mysqld_multi= "$bindir/mysqld_multi";
+else
+ echo "Can't execute $bindir/mysqld_multi from dir $basedir"
+fi
+
+case "$1" in
+ start )
+ "$mysqld_multi" start
+ ;;
+ stop )
+ "$mysqld_multi" stop
+ ;;
+ report )
+ "$mysqld_multi" report
+ ;;
+ restart )
+ "$mysqld_multi" stop
+ "$mysqld_multi" start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|report|restart}" >&2
+ ;;
+esac