~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

1 by James Page
Import upstream version 5.6.15
1
#!/bin/sh
2
#
3
# A simple startup script for mysqld_multi by Tim Smith and Jani Tolonen.
4
# This script assumes that my.cnf file exists either in /etc/my.cnf or
5
# /root/.my.cnf and has groups [mysqld_multi] and [mysqldN]. See the
6
# mysqld_multi documentation for detailed instructions.
7
#
8
# This script can be used as /etc/init.d/mysql.server
9
#
10
# Comments to support chkconfig on RedHat Linux
11
# chkconfig: 2345 64 36
12
# description: A very fast and reliable SQL database engine.
13
#
14
# Version 1.0
15
#
16
17
basedir=/usr/local/mysql
18
bindir=/usr/local/mysql/bin
19
20
if test -x $bindir/mysqld_multi
21
then
22
  mysqld_multi="$bindir/mysqld_multi";
23
else
24
  echo "Can't execute $bindir/mysqld_multi from dir $basedir";
25
  exit;
26
fi
27
28
case "$1" in
29
    'start' )
30
        "$mysqld_multi" start $2
31
        ;;
32
    'stop' )
33
        "$mysqld_multi" stop $2
34
        ;;
35
    'report' )
36
        "$mysqld_multi" report $2
37
        ;;
38
    'restart' )
39
        "$mysqld_multi" stop $2
40
        "$mysqld_multi" start $2
41
        ;;
42
    *)
43
        echo "Usage: $0 {start|stop|report|restart}" >&2
44
        ;;
45
esac