Gan y gall y broses MySQL ar systemau Linux chwalu weithiau, ac mae gosod a ffurfweddu'r rhaglen fonitro MONIT yn gofyn am fynediad i ffeil pid proses system MySQL , ond does neb yn gwybod ble na sut i ddod o hyd i'r ffeil pid hon, rwy'n rhannu'r wybodaeth hon yma!
Gall y ddau orchymyn SSH canlynol weld y broses mysql:
ps -ef|grep mysqldwatch -n 1 "ps -ef | grep mysql"
Mae SSH yn dychwelyd canlyniadau'r ymholiad fel a ganlyn:
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 mysqldGobeithio y bydd yr erthygl "Where is the MySQL database process pidfile? The command to query the MySQL pidfile" a rennir ar flog Chen Weiliang ( https://www.chenweiliang.com/ ) o gymorth i chi.
Mae croeso i chi rannu'r ddolen erthygl hon: https://www.chenweiliang.com/cwl-438.html
