宝塔定时重启数据库
展开阅读全文
pgrep -x mysqld &> /dev/null
if [ $? -ne 0 ];then
/etc/init.d/mysqld start
fi