[How To] Fix "MySQL is running but PID file could not be found" error

MySQL is one of the widely used database software in the application world. Many times, one has to work on the MySQL services and restart the services for the changes made to take effect or etc...

While restarting MySQL service, you may get a error as

MySQL is running but PID file could not be found

This might be due to issues with disk space, disk inode usage or innodb corruption which may lead to the error.

In my case, the issue was with the pid file and solution was:

1) SSH server as a root user

2) Create directory /var/run/mysql

mkdir /var/run/mysql

3) Create  a file with name as mysqld.pid

touch mysqld.pid

4) Change its ownership and group to  mysql:mysql

chown mysql:mysql mysqld.pid

5) Restart MySQL service and you will see no more errors

If any feedback, queries are always welcome!


MySQL is one of the widely used database software in the application world. Many times, one has to work on the MySQL services and restart the services for the changes made to take effect or etc... While restarting MySQL service, you may get a error as MySQL is running but PID file could not be ...

Review Overview

User Rating: Be the first one !
0

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>