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
3) Create a file with name as 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!