HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

MySQL wait_timeout setting ignored

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
ignoredmysqlwait_timeoutsetting

Problem

I have a MySQL 5.5 instance running on a RedHat distro. I have edited my.cnf with the following setting:

wait_timeout=30


However, client connections are sleeping and never getting killed. The server has been restarted with the new setting in place.

What am I not understanding?

my.cnf:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
performance_schema=off
innodb_buffer_pool_size=64M

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

wait_timeout = 30

key_buffer      = 16M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 500
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit   = 1M
query_cache_size        = 16M

expire_logs_days    = 10
max_binlog_size         = 100M

bind-address=192.168.0.11
interactive_timeout = 60
max_connections = 500

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[isamchk]
key_buffer      = 16M


EDIT

Interestingly per @RolandMySQLDBA comments:

It appears none of the cnf file settings are being considered.

and the proof:

[root@localhost ~]# locate my.cnf
/etc/my.cnf
/opt/rh/mysql55/root/etc/my.cnf

Solution

My immediate suspicion is that there is another my.cnf present on the system. You should run

locate my.cnf


and see if the reports multiple my.cnf files

If there is only one my.cnf, then my.cnf is most likely in the wrong folder.

It should be in one of the following places

  • /etc/my.cnf



  • /etc/mysql/my.cnf



  • /var/lib/mysql/my.cnf



  • ~/my.cnf



Please check for these. Remove extras.

Code Snippets

locate my.cnf

Context

StackExchange Database Administrators Q#81056, answer score: 2

Revisions (0)

No revisions yet.