MySQL數據庫進程pidfile文件在哪裡?查詢MySQL pidfile命令

由於Linux系統的MySQL的進程會出現宕機的情況,但是安裝配置MONIT監控程序,需要調用MySQL的系統進程的pidfile文件,卻不知道在哪裡找到這個pidfile文件,更不知道如何找到這個MySQL的pidfile文件,所以在此分享給大家!

以下2個SSH命令,都能查看mysql進程:

ps -ef|grep mysqld

watch -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 mysqld

希望陳溈亮博客( https://www.chenweiliang.com/ ) 分享的《MySQL數據庫進程pidfile文件在哪裡?查詢MySQL pidfile命令》,對您有幫助。

歡迎分享本文鏈接:https://www.chenweiliang.com/cwl-438.html

歡迎加入陳溈亮博客的Telegram 頻道,獲取最新更新!

🔔 率先在頻道置頂目錄獲取寶貴的《ChatGPT 內容行銷AI 工具使用指南》! 🌟
📚 這份指南蘊含價值巨大,🌟難逢的機遇,切勿錯失良機! ⏰⌛💨
喜歡就分享和按贊!
您的分享和按贊,是我們持續的動力!

 

發表評論

您的電子郵箱地址不會被公開。 必填項已用 * 標註

滾動到頂部