supervisorctl添加mysql啓動

1. 添加mysql配置文件

Sangfor:EDS/eds-490a59b5 /etc/supervisor/conf.d # cat mysql_hive.conf
[program:mysql]
command=/usr/bin/mysqld_safe --basedir=/usr
user=mysql
priority=999
autostart=true
autorestart=unexpected
exitcodes=0,2
startsecs=2
stopwaitsecs=60
 

2. 將該組件加入supervisor

切記不要用update和reload,它們會重啓管理的所有的監控服務,可能導致其他服務異常。

使用remove刪掉被更新服務,reread重新讀取所有服務配置,add重新拉起該服務

使用status觀察所有服務狀態

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章