Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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

At some point Percona MySQL on CentOS 6.4 seems to have stopped reading my.cnf, possibly after MySQL updated to 5.5.33 a few days ago.

Selection from /etc/my.cnf:


user                    = mysql
default-storage-engine  = InnoDB
socket                  = /var/lib/mysql/mysql.sock
pid_file                = /var/run/
symbolic-links          = 0 

collation-server        = utf8_unicode_ci
character-set-server    = utf8
init-connect            = 'SET NAMES utf8'
init-connect            = 'SET collation_connection = utf8_unicode_ci'

datadir                 = /var/lib/mysql
tmpdir                  = /tmp
slow_query_log_file     = mysql-slow.log
slow_query_log          = 1 
long_query_time         = 8 
log_error               = mysql-error.log

max_connections         = 250
max_connect_errors      = 10000
open_files_limit        = 20000
back_log                = 100
wait_timeout            = 10800
interactive_timeout     = 600
max_allowed_packet      = 256M
tmp_table_size          = 512M
max_heap_table_size     = 64M 
query_cache_size        = 32M
thread_cache_size       = 64

Some output from 'mysqld --help --verbose'

log-error                                         mysql-error.log
slow-query-log                                    TRUE
slow-query-log-file                               mysql-slow.log
max-connections                                   250
max-heap-table-size                               67108864

Ok that seems good, matches my config. How about logging into mysql and doing some SHOW VARIABLES:

log_error   /var/lib/mysql/hostname.err
log_slow_queries    OFF
slow_query_log_file /var/lib/mysql/hostname-slow.log
max_connections 151
max_heap_table_size 16777216

Huh, well that ain't right. Slow log is off, error log has the wrong name, connection and heap sizes are wrong, and the server collation is wrong as well.

Processes running

root     23533     1  0 12:32 pts/3    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/
mysql    23624 23533 91 12:32 pts/3    01:05:32 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/hostname.err --pid-file=/var/lib/mysql/

I see the error log listed in the process has the wrong name right off the bat. I've tried manually restarting mysql from /etc/init.d, via 'service mysql restart', via restarting the entire server. Nothing seems to get MySQL to read the conf.

Maybe something is breaking when mysqld_safe spins up a mysql instance? No problems reported in the error log when the server starts. Any ideas?

share|improve this question
Try this answers.… Ahh, i need 30 characters in post. – netneladno Sep 17 '13 at 20:57
stat("/etc/my.cnf", {st_mode=S_IFREG|0644, st_size=5209, ...}) = 0 open("/etc/my.cnf", O_RDONLY) = 3 (run mysqld directly and the my.cnf is obeyed, as noted in my OP, but when run as a system service it is not using my.cnf) – xref Sep 17 '13 at 21:09
whell may be they moved config into /etc/mysql/my.cnf – netneladno Sep 17 '13 at 21:19
as of – netneladno Sep 17 '13 at 21:19
i just don't have centos to investigate, look at the init script – netneladno Sep 17 '13 at 21:20
up vote 1 down vote accepted

Ultimately the problem was SELinux on CentOS, and the answer was to disable SELinux! I couldn't find any errors in the SELinux log related to MySQL so this took quite some time to track down.

share|improve this answer
+1 the first question should always be, "what else changed?" ;-) – Bill Karwin Dec 3 '13 at 0:10

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.