欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

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

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

Postbygolden3»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

  • Forum Moderator
  • Posts:21154

  • Joined:

    2009/09/24 10:40:56
  • Location:

    Brighton, UK

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

PostbyTrevorH»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.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator.Use the FAQ Luke
  • aks

  • Posts:2498

  • Joined:

    2014/09/20 11:22:14

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

Postbyaks»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).

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

PostbyNauman87»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)."

再在本网站搜 " The server quit without updating PID file"


" 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


来自 https://www.centos.org/forums/viewtopic.php?t=62154


普通分类: