Where is the MySQL database process pidfile file?Query MySQL pidfile command

due toLinuxsystematicMySQLThe process will crash, but the installation configurationMONIT monitoringprogram, which needs to be calledMySQLThe pidfile file of the system process, but I don't know where to find the pidfile file, let alone how to find the pidfile file of this MySQL, so I share it with you here!

The following two SSH commands can view the mysql process:

ps -ef|grep mysqld

watch -n 1 "ps -ef | grep mysql"

SSH returns the query results as follows:

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

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Where is the MySQL database process pidfile file?Query MySQL pidfile command", it will help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-438.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top