mysql is dead but subsys locked

心已入冬 提交于 2019-11-29 23:06:56

I had this problem with my OTRS server after I tried to update a to large package.

The solution was:

copy for safty:

cp /var/lock/subsys/mysqld /root/mysqld

than delete it

rm /var/lock/subsys/mysqld

than close all services that depends on mysql:

service httpd stop
service otrs stop

after that:

service mysqld restart
service httpd restart
service otrs restart

System is CentOS 6.x

user3018158
  1. tail /var/log/mysqld.log to check the error log
  2. then do the following actions:

    rm /var/lock/subsys/mysqld chown -R mysql.mysql /var/run/mysqld

service mysqld restart

Simply restarting the mysqld worked fro me on Centos.

first,make sure that /etc/init.d/mysqld is running from /usr/local/mysql/bin then,kill mysqld ,delete the lock file and restart it.

This (and all sorts of other weird errors) can also happen if you have a full disk. In my case, my /var partition had filled up. Freeing up space allowed mysqld to restart again.

First find the PID number of mysqld:

 1. Use top | grep mysqld
 2. kill -9 PID

Safe method, works fine with Cent OS

Rebooting the server worked for me. Please remember to start all the services once you reboot in case you haven't added 'chkconfig' for them, lets say httpd, named and mysql.

i use command kill, step by step:

  1. use command service mysqld status for find PID mysqld
  2. kill -9 PID
  3. use command service mysqld status again for find PID mysqld
  4. kill -15 PID
  5. check again with command service mysqld status , check until the PID dead OR subsys locked
  6. use command service mysqld start
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!