mysql_rhcs配置
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://csdahua.cn/article/jhcoeg.html
扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流