[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!

About Abhijit Sandhan

Loves Open Source, Blogging, Traveling, Hiking and sharing Knowledge!


  1. I get the error "mysqld dead but pid file exists" Would you know why I see this error ?

    • It seems that the process is still running. Check the process id using command
      ps aufx | grep mysql*
      and kill that process using kill command
      kill -9 PID
      Try restarting MySQL service

  2. Hi,
    thanks for that post.
    but my problem not resolved.
    i giving that error ( MySQL is running but PID file could not be found )
    please help me, so thanks

  3. iDed Network | WebHosting , VPS Hosting , Dedicated Hosting

    we have this problem:

    [email protected] [~]# service mysql start
    Starting MySQL.The server quit without updating PID file (/var/lib/mysql/server.domain.com.pid). [FAILED]

Leave a Reply

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