I had a power outage. Now MySQL's lock file won't go away. What do you suggest?
Posted
by
jasonspiro
on Server Fault
See other posts from Server Fault
or by jasonspiro
Published on 2012-07-05T20:24:59Z
Indexed on
2012/07/05
21:18 UTC
Read the original article
Hit count: 458
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?
© Server Fault or respective owner