33 lines
458 B
Text
33 lines
458 B
Text
|
#!/bin/sh
|
||
|
#
|
||
|
# MySQL Multi server start/stop script
|
||
|
#
|
||
|
|
||
|
MYSQL_MULTI="/usr/bin/mysqld_multi --config-file=/root/my_multi.cnf"
|
||
|
SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
|
||
|
|
||
|
case "${1:-''}" in
|
||
|
'start')
|
||
|
$MYSQL_MULTI start
|
||
|
;;
|
||
|
|
||
|
'stop')
|
||
|
$MYSQL_MULTI stop
|
||
|
;;
|
||
|
|
||
|
'restart')
|
||
|
set +e; $SELF stop; set -e
|
||
|
$SELF start
|
||
|
;;
|
||
|
|
||
|
'status')
|
||
|
$MYSQL_MULTI report
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
echo "Usage: $SELF start|stop|restart"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|