添加定时任务防止Mysql停止运行

最后编辑时间: 2022-11-12

仅限于宝塔面板的Mysql服务

添加定制任务,选择shell脚本,自行设置运行时间即可

  1. pgrep -x mysqld > /dev/null
  2. if [ $? -ne 0 ];then
  3. bash /www/server/panel/script/rememory.sh
  4. /etc/init.d/mysqld start
  5. fi

请在下方留下您的评论.加入TG吹水群