SOLVED-ERROR! MySQL is running but PID file could not be found

0

This note below will help you fix the error message of “ERROR! MySQL is running but PID file could not be found”

Step 1
. Check Status of MySQL
root@server[~] service mysql status
ERROR! MySQL is running but PID file could not be found
root@server[~]
Step 2
find all MySQL processes running and look for the pid numbers
root@server[~]ps aux | grep mysql
You will see something like this
root@mani [~]# ps aux | grep mysql
root 27599 0.0 0.0 3200 1304 pts/0 S 05:20 0:00 /bin/sh /usr/bin/mysqld_safe –datadir=/var/lib/mysql –pid-file=/var/run/mariadb/mariadb.pid
mysql 27723 54.7 1.6 909044 268256 pts/0 Sl 05:20 0:52 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-dir=/usr/lib/mysql/plugin –user=mysql –log-error=/var/lib/mysql/mani.zimparcels.com.err –open-files-limit=10000 –pid-file=/var/run/mariadb/mariadb.pid
root 27830 0.0 0.0 2340 632 pts/0 R+ 05:21 0:00 grep mysql
PID =27723
Step 3
Now kill all the MySQL processes running-
root@server[~]kill -9 pid1 pid2 …
Step 4
Start MySQL.
root@server[~] service mysql start
Step 5
Now check the My SQL status for confirmation.
[root@server ~]# service mysql status
 SUCCESS! MySQL running
SOLVED-ERROR! MySQL is running but PID file could not be found
Share.

About Author

Comments are closed.