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


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?



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

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

interactive_timeout = 60
max_connections = 500


key_buffer      = 16M


Interestingly per @RolandMySQLDBA comments:

enter image description here

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

and the proof:

[root@localhost ~]# locate my.cnf
  • Please post your my.cnf into the question. – RolandoMySQLDBA Oct 24 '14 at 18:30
  • @RolandoMySQLDBA Done. – Roy Hinkley Oct 24 '14 at 18:37
  • 1
    Run the following: SELECT * FROM information_schema.global_variables WHERE variable_name='wait_timeout' UNION SELECT * FROM information_schema.session_variables WHERE variable_name='wait_timeout'; What comes back, one row or two ? – RolandoMySQLDBA Oct 24 '14 at 18:41
  • @RolandoMySQLDBA 1 row containing WAIT_TIMEOUT with a value of 28800 – Roy Hinkley Oct 24 '14 at 18:43
  • two row is coming, and did not changed is for session_variables – Ramratan Gupta Jun 21 '18 at 13:14

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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