开发者

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

where do I go to open or find the /var/l开发者_开发技巧ib/mysql file?


You can run for getting pid path.

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

On debian result is --pid-file=/var/run/mysqld/mysqld.pid


If it's the process id of the mysqld service you are needing to find, then you can do:

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


If the /var/lib/mysql directory does not exists, then the .pid in file in it can't exist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜