Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
NickTheGreek

Fix : ERROR! MySQL server PID file could not be found!

Recommended Posts

This is a common problem and may have several reasons. Sometimes when we simply want to restart the MySQL Server, we can get such an error:
ERROR! MySQL server PID file could not be found!

First of all, always check if the /tmp partition is full. This can happen when MySQL can’t write to the /tmp partition to create a lock file.

df -h

Also, this may be because, somehow the /tmp partition has been cleared and the MySQL server is looking for the PID file there. So easy-peasy just create a new pid file and restart the server.

touch /tmp/mysql.sock
service mysqld restart

It can also help to check the status, sometimes it helps. For example sometimes you can get an error like this :

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

Well, it’s kind of obvious, just remove the lock file and restart the server.

rm /var/lock/subsys/mysql
service mysqld restart

If this not work then you need to kill current mysql process from server using below steps :

ps -aufx | grep mysql

You get all process of mysql with process ID. You need to kill all PID for mysql using below command

kill -9 PID1 PD2...

then restart mysql service

service mysql restart

That’s it smile.gif

http://www.webhostingtalk.com/showthread.php?t=1424779

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×