Reputation: 1011
where do I go to open or find the /var/lib/mysql file?
Upvotes: 2
Views: 18632
Reputation: 7504
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
Upvotes: 8
Reputation: 270687
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
Upvotes: 4
Reputation: 99911
If the /var/lib/mysql directory does not exists, then the .pid in file in it can't exist.
Upvotes: 1