Take the 2-minute tour ×

I don't know if this problem is specific to my set up but when I add the line

log = /var/log/mysql.log

to the mysqld section of a copied my-large.cnf file and try to restart the mysql server I get the error

Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/centos-server.pid).

I've created the file /var/log/mysql.log, set its owner and group to mysql and set the permissions on /var/log to 777 (for the moment)

I'm on centos, with mysql 5.6.5 m8 (the development release).

This is a snippet of the my.cnf file

port            = 3306
socket          = /var/lib/mysql/mysql.sock
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
log = /var/log/mysql.log
share|improve this question
Have you tried killing all mysql processes, deleting the pid file in /var/lib/mysql/centos-server.pid and restarting mysql? –  Florin Stingaciu Jul 19 '12 at 17:15
There are no mysql processes running. And as soon as i comment out that line for log = , try a restart it works perfectly. –  JasonM Jul 19 '12 at 17:20
I had a friend who ran into this issue before. For some reason when he tried to use service mysql start he would get that error but as soon as he tried running it by going straight to the binary it would work. I think it was because in the daemon script it would enable logging as well and mysql would just not start. –  Florin Stingaciu Jul 19 '12 at 17:23
Also you're sure your disk is not full; or the partition that /var is located on right? –  Florin Stingaciu Jul 19 '12 at 17:29

1 Answer 1

up vote 2 down vote accepted

Seems like the log directive is outdated and my.cnf requires the directive

general-log = 1

If specified like this the log file will be created in a default location (which on centos is /var/lib/mysql/centos-server.log)

share|improve this answer

Your Answer


