Fix "MySQL is running but PID file could not be found" error

mysql logoWhile restarting MySQL service, you may get a error

"MySQL is running but PID file could not be found"

Let us see how to fix this error:

  • Login to the server as a root user with SSH
  • Create the directory var/run/mysql

#mkdir /var/run/mysql

  • Now create  file mysqld.pid

#touch mysqld.pid

and change its ownership to  mysql:mysql

#chown mysql:mysql mysqld.pid

  • Restart MySQL service and you will see no more error

If any feedback, queries are always welcome!


About Abhijit Sandhan

Abhijit Sandhan
Loves Linux, Blogging, Traveling, Hiking and sharing the knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

CAPTCHA Image

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>