Linux စနစ် တွေမှာ MySQL လုပ်ငန်းစဉ်ဟာ တစ်ခါတစ်ရံမှာ crash လုပ်နိုင်တာ ကြောင့် MONIT စောင့်ကြည့်ရေး ပရိုဂရမ်ကို install လုပ်ပြီး configure လုပ်ဖို့အတွက် MySQL စနစ်လုပ်ငန်းစဉ်ရဲ့ pidfile ကို access လုပ်ဖို့လိုအပ် ပေမယ့် ဒီ pidfile ကို ဘယ်မှာရှာရမလဲဆိုတာ ဘယ်သူမှမသိတဲ့အတွက် ဒီအချက်အလက်ကို ဒီမှာမျှဝေလိုက်ပါတယ်။
အောက်ပါ SSH command နှစ်ခုသည် 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/ ) မှာ မျှဝေထားတဲ့ "Where is the MySQL database process pidfile? The command to query the MySQL pidfile" ဆောင်းပါးက သင့်အတွက် အထောက်အကူဖြစ်လိမ့်မယ်လို့ မျှော်လင့်ပါတယ်။
ဒီဆောင်းပါးလင့်ခ်ကို မျှဝေပေးဖို့ မတွန့်ဆုတ်ပါနဲ့- https://www.chenweiliang.com/cwl-438.html
