I do freelance IT consulting for various clients, both in Toronto, Canada, and worldwide.
A client recently experienced a power failure. Now they've been having various problems with a Slackware 12.0.0 machine which also acts as a DNS server.
One problem is that they can't log into phpMyAdmin.
I tried stopping and restarting MySQL. But even when MySQL is stopped, the lock file stays around.
jasonspiro@cybertron:~$ sudo /etc/init.d/mysql stop Shutting down MySQL. SUCCESS! jasonspiro@cybertron:~$ sudo /etc/init.d/mysql stop ERROR! MySQL manager or server PID file could not be found! jasonspiro@cybertron:~$ sudo /etc/init.d/mysql status ERROR! MySQL is not running, but lock exists jasonspiro@cybertron:~$ ls -l /var/lock/subsys/mysql -rw-r--r-- 1 root root 0 2012-07-05 16:18 /var/lock/subsys/mysql
Why is MySQL's lock file hanging around despite the fact that MySQL isn't running?
Can I simply stop MySQL, delete the lock file, and start MySQL again?
Are there any other steps that I should take next, or nothing?
EDIT: A while after I asked this question, I noticed that the way MySQL is installed on this machine seems wonky. Also, I found out that the
/etc/init.d/mysql script I found on this machine always creates a lock file when it starts MySQL and never deletes the file when it stops MySQL. So this question turns out to be irrelevant to me. Thank you, but I don't need more answers to this question.