MySQL==cluster
=====
rhcs_mysql.sh
#!/bin/bash
MYSQL_HOME=/mysql/mysql-advanced-5.6.26
function start() {
su - mysql -c "
$MYSQL_HOME/bin/mysqld_safe &
"
}
function stop() {
su - mysql -c "
$MYSQL_HOME/bin/mysqladmin -uroot -p'Mysql_admin_25' shutdown
"
}
function status() {
chk_mysqld=`ps -ef| grep mysqld |grep -v grep | wc -l`
if [ $chk_mysqld -lt 2 ];then
echo "The MySQL database is not runing"
exit 1
else
echo "The MySQL database is runing"
return 0
fi
}
case "$1" in
"start")
echo "Startting MySQL Database ..."
start
;;
"stop")
echo "Stopping MySQL Database ..."
stop
;;
"status")
status
;;
*)
echo "Usage : `basename $0` {start | stop | status}"
exit 0
;;
esac
当前标题:mysql_rhcs配置
当前网址:
http://bjjierui.cn/article/jhcoeg.html