Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to edit the /etc/my.cnf file.

I've tried to use this as the file content:

set-variable = max_allowed_packet=24M
set-variable = max_connections=300

then, I've tried to restart the mysql server:

/etc/rc.d/init.d/mysql restart

but it failed with the following error:

root@server1 [~]# /etc/rc.d/init.d/mysql restart
Shutting down MySQL.... [ OK ]
Starting MySQL...The server quit without updating PID file (/var/lib/mysql [FAILED]

I've read here that I need to replace [mysqld] with [mysql], but he is using Percona, and I am just using a standart whm/cpanel installation, will it work too?

share|improve this question
You need to read the error log and find out what's preventing MySQL from starting. – dawud Jun 21 '14 at 10:55
FWIW, I'm not aware that set-variable = max_allowed_packet=24M is valid my.cnf syntax. You set variables by just putting the name=value pair in there. – Felix Frank Jun 21 '14 at 11:07
ah so this is the right syntax, previously is for old mysql syntax [mysqld] max_allowed_packet=24M max_connections=300 log-slow-queries local-infile=0 open_files_limit=3980 btw if i add safe-show-database, got FAILED message too, is it already changed too? – Earl Jun 21 '14 at 21:44

First of all check mysql logs and error logs to see whats going on with mysql service,if you see no error logs than you can deploy these steps.

Check if there is any running MySQL process

ps aux | grep mysql

If you are able to see any mysql process like below, just kill that process.

kill -9 pid

Make sure that there is no mysql process running at this point. Restart MySQL.


Try moving the mysql config file /etc/my.cnf file and restart mysql.

mv /etc/my.cnf /etc/my.cnf.backup

Restart mysql.


Try to move the log file named ib_logfile in /var/lib/mysql and restart mysql. Sometimes mysql will fail because it face difficulty updating the log file.

mv /var/lib/mysql/ib_logfile* /root/

Restart and see the results.

service mysqld restart

You can also remove ib_logfile as it will be created automatically after mysql restart.

share|improve this answer
omg, why all this fuss instead of just opening your error log ?? – ADM Jun 21 '14 at 11:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.