首页 > 数据库技术 > 详细

MySQL 多实例启动和关闭脚本

时间:2016-01-29 20:16:17      阅读:203      评论:0      收藏:0      [点我收藏+]

DB: 5.5.14

OS:CentOS 6.3

在MySQL多实例中,一个一个启动灰常麻烦,因此写个简单的启动和关闭脚本


启动脚本:start.sh

#!/bin/bash

for port in {3390..3396}

do

(/export/servers/mysql/bin/mysqld_safe --defaults-file=/export/servers/mysql/etc/my$port.cnf  ) &

done


关闭脚本:stop.sh

#!/bin/bash

for port in {3390..3396}

do

(/export/servers/mysql/bin/mysqladmin -uroot -p  -S /export/data/mysql/tmp/mysql$port.sock  shutdown) &

done

 
 

MySQL 多实例启动和关闭脚本

原文:http://www.cnblogs.com/hankyoon/p/5169606.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!