最近网站受攻击,每天mysql都会崩溃一次,又找不到原因,只好先用这个办法方便下
宝塔【计划任务】增加一个shell脚本,设置为1分钟执行一次以下脚本:
pgrep -x mysqld &> /dev/null
if [ $? -ne 0 ];then
/etc/init.d/mysqld start
fi
study and work notes
最近网站受攻击,每天mysql都会崩溃一次,又找不到原因,只好先用这个办法方便下
宝塔【计划任务】增加一个shell脚本,设置为1分钟执行一次以下脚本:
pgrep -x mysqld &> /dev/null
if [ $? -ne 0 ];then
/etc/init.d/mysqld start
fi