ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

Issues related to applications and software problems
Post Reply
golden3
Posts: 50
Joined: 2014/07/22 05:55:42

ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

Post by golden3 » 2017/04/10 12:21:45

In Centos7.3 i have configured , MySQL NDB cluster after installing an tomcat not able to start an mysql service,

while giving the command to "service mysql start" its showing the error , anyone idea on this ?

ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

Post by TrevorH » 2017/04/10 13:38:14

We do not ship Mysql on CentOS 7. We ship mariadb. If you have mysql packages installed then they did not come from us and you need to ask the provider of those packages for support.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

Post by aks » 2017/04/10 17:01:36

MySQL NDB cluster
That is certainly not supported here.
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
Usually what that means is that systemd sent the start command, mysql launched, populated the lock for the subsystem and then exited due to an error. Try running mysql in the foreground and see if you get any other clues (and/or check mysql's error log).

Nauman87
Posts: 1
Joined: 2017/09/12 07:43:37

Re: ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

Post by Nauman87 » 2017/09/12 07:50:57

Hi dear,

I have facing the same thing and finally got the solution.

This was the error:

-service mysql status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

After getting this error, just follow the following steps:

1- rm /var/lock/subsys/mysql
rm: remove regular empty file ‘/var/lock/subsys/mysql’? y (Press 'y')

2-/etc/init.d/mysql start
Starting MySQL....................................................................................................

3- In case you got the error again like "ERROR! The server quit without updating PID file (/mysql/data/kalsym.com.pid)."

" ps -ef | grep mysql "

Kill all mysql process

and repeat the Step 1 & 2. This should resolve the issue.

NOTE: Check your disk space as well

Thanks

Post Reply