How to fix error "Starting MySQL... ERROR! The server quit without updating PID file"

fwh

Administrator
Staff Member
Joined
Dec 8, 2012
Messages
709
Best answers
0
Ratings
269 1
Points
63
#1
Today I made some changes on MySQL configuration file and restart Mysql server with the command

Code:
sudo service mysqld start
but whoopp... it made website databases error and MySQL could not be restarted.

[[email protected] ~]# sudo service mysqld start
Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/server.example.com.pid).
I tried to find solutions on Google and more results from stackoverflow or serverfault but most answers are common and could not solve this problem completely.

This is my way to solve this problem

Code:
mv /etc/my.cnf /etc/my.cnf.old
After that, restarted Mysql and succeeded.

Code:
[[email protected] ~]# service mysqld restart
Shutting down MySQL.. SUCCESS!
But where is my.cnf ? it was moved to my.cnf.old and I will lose this mysql configuration file?

I tried to copy the backup file my.cnf to /var/lib/mysql/ and restarted Mysql again but still getting same error.

[[email protected] ~]# sudo service mysqld start
Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/server.example.com.pid).
So I tried this way

Code:
sudo killall mysqld
This make sure that It will stop all mysql services including PID file (/var/lib/mysql/server.example.com.pid)

now I copied file my.cnf back and start mysql again

Code:
service mysqld restart
[[email protected] ~]# sudo service mysqld start
Starting MySQL SUCCESS!
The problem is solved and I can use my.cnf as before.

Hope I will not face this problem any more :D


Regards,
 
Latest Threads
Replies
0
Views
1
Replies
1
Views
29
Replies
3
Views
12
Replies
3
Views
20
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top