簡體   English   中英

如果在終端中沒有這樣的目錄,如何在/ var / lib / mysql中找到.pid文件?

[英]How do I locate the .pid file in /var/lib/mysql when in terminal there is no such directory?

我在哪里打開或找到/ var / lib / mysql文件?

你可以跑去獲取pid路徑。

/usr/sbin/mysqld --print-defaults | tr " " "\n" | grep pid | tail -n 1 

在debian結果是--pid-file = / var / run / mysqld / mysqld.pid

如果它是您需要找到的mysqld服務的進程ID,那么您可以這樣做:

ps aux |grep [m]ysqld

# Result something like
root      2665  0.0  0.0   4644  1288 ?        S    Jul26   0:00 /usr/libexec/mysqld
  -------^^^^^^^--- that's the pid

如果/ var / lib / mysql目錄不存在,則其中的.pid文件不能存在。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM