Tuesday, August 16, 2016

ERROR! MySQL manager or server PID file could not be found!



Error :- You may get ERROR! MySQL manager or server PID file could not be found! when starting MySQL service.


Cause :- Existing PID doesn't allow to create new PID.


WorkAround:- Kill the old PID and then start MySQL service.


Step 1-  

Check MySQL existing PID  using command :-   ps -aufx | grep mysql

 
[root@cent ~]# ps -aufx | grep mysql
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 10075 0.0 0.0 61304 748 pts/0 S+ 00:31 0:00 \_ grep mysql
root
4723 0.0 0.0 65948 1312 ? S Mar13 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/
cent.pid
mysql 4816 0.0 2.1 288868 85376 ? Sl Mar13 198:35 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/cent .err --pid-file=/var/lib/mysql/cent.pid

In above query, we found two Existing PID.


Step 2 - 
Let's kill them using kill command. 

[root@cent ~]# kill -9 4723
[root@cent ~]#
kill -9 4816


Step 3- 
Now start MySQL service.
[root@cent ~]# /etc/init.d/mysqld start
Starting MySQL...... SUCCESS!


Step 4 -
Let's Check MySQL service Status.

[root@cent ~]# /etc/init.d/mysqld status
SUCCESS! MySQL running (14346)
[root@cent ~]#


MySQL service has been restarted successfully 



That's All

!!!Cheers!!!




No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

How to Setup Chef Workstation, Hosted Chef Server and Configure Node using Chef cookbook

Chef:   Chef is a powerful tool for automation that transforms infrastructure into code. Whether you're operating in the cloud or on-pre...