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

Share on Facebook3
Share on Google+6Tweet about this on TwitterShare on StumbleUpon0Share on LinkedIn0Share on Tumblr0Digg thisPin on Pinterest0Share on Reddit0Email this to someonePrint this page
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…

Review Overview

User Rating: 3.36 ( 6 votes)

About Abhijit Sandhan

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

4 comments

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

    • Abhijit Sandhan

      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

    hello
    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 *

CAPTCHA