리눅스 시스템 에서 MySQL 프로세스가 가끔씩 충돌하는 경우가 있는데 , MONIT 모니터링 프로그램을 설치하고 구성하려면 MySQL 시스템 프로세스의 pidfile 에 접근해야 합니다 . 하지만 이 pidfile을 어디서 어떻게 찾는지 아는 사람이 거의 없어서 이 정보를 공유합니다!
다음 두 SSH 명령은 mysql 프로세스를 볼 수 있습니다.
ps -ef|grep mysqldwatch -n 1 "ps -ef | grep mysql"
SSH는 다음과 같이 쿼리 결과를 반환합니다.
root 6206 1 0 16:19 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/centos-ufo.pid
mysql 6280 6206 3 16:19 ? 00:00:22 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/centos-ufo.err --pid-file=/var/lib/mysql/centos-ufo.pid
root 6691 1844 0 16:29 pts/0 00:00:00 grep mysqldChen Weiliang님의 블로그( https://www.chenweiliang.com/ ) 에 공유된 "MySQL 데이터베이스 프로세스 pidfile은 어디에 있나요? MySQL pidfile을 조회하는 명령어"라는 글이 도움이 되셨으면 좋겠습니다.
이 기사 링크( https://www.chenweiliang.com/cwl-438.html )를 자유롭게 공유해 주세요.
