• 1-888-289-2246
  • 24x7x365 Presence

MySQL is running but the PID file cannot be found?


Sometimes when we try to stop the mysqld service on the server we get the error below :-

MySQL is running but PID file could not be found [Failed]

There are several reasons why one may get this error. No pid file may be present in the path “/var/run/mysql/” due to which this would happen.

In that case, the steps below may fix the problem:-

Make sure /var/run/mysqld is present and if not then create that directory using mkdir/var/run/myslqd

Then create a pid file as below :-

touch mysqld.pid

and change its ownership to mysql:mysql as below :-

chown mysql:mysql mysqld.pid

and then restart the mysqld service and it shouldn’t give you any error this time.

]]>


Leave a Reply

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