0

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

I got the following error when checking the status of MySQL, and if i restart the MySQL also returns the same one.....

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

 # service mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL.... ERROR! The server quit without updating PID file
MySQL Add a comment
isaiah
asked Feb 08 2017

Answer

0

Run the below command to remove the lock file and restart the service.

# rm /var/lock/subsys/mysql

If not started then it means that MySQL was not stopped properly, so check it with ps or lsof command and kill it.

Once it is done, restart the service and check. It will work fine..!!!

Add a comment
jagannatharumugam
asked Feb 12 2017
edited Oct 05 2018
Post your Answer
0

If you are facing this error try to run this command"# rm /var/lock/subsys/mysql" I think this will solve your error easily.

Available here https://shavonyagroup.com Contractor Services in Brooklyn NY

Add a comment
ayesy
asked Jul 06 2023
edited Jul 07 2023
Post your Answer
0

Thanks for help!

https://emirates.estate/

Add a comment
JamesLens
asked Sep 18 2023
edited Sep 19 2023
Post your Answer