宝塔的MySql守护具体代码

常用教程评论2,1741阅读模式

MySql守护的作用:当发现MySQL停机了,即立刻重启MySQL。

可以设置为N分钟执行一次。文章源自原紫番博客-https://www.yuanzifan.com/54374.html

 文章源自原紫番博客-https://www.yuanzifan.com/54374.html

pgrep -x mysqld &> /dev/null
if [ $? -ne 0 ];then
bash /www/server/panel/script/rememory.sh
/etc/init.d/mysqld start
fi
文章源自原紫番博客-https://www.yuanzifan.com/54374.html文章源自原紫番博客-https://www.yuanzifan.com/54374.html
 

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证