MySQL is dead but subsys locked
When tried to connect to MySQL or run any command.
It Displayed The Following Error:
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'(2)
When checked the status of MySQL service from the below command:
service mysqld status
as a root user I got :
mysql is dead but subsys locked
Here is the solution for the issue:
copy for safety :
cp /var/lock/subsys/mysqld /root/mysqld
than delete it
then close all services that depend on MySQL:
service httpd stop
service mysqld restart Then restart all the dependable services.