Over the weekend I came across an extremely curious issue with
MySQL. It seemed that no matter how many times I tried to set the
wait_timeout, it would always show the value of
interactive_timeout. I even tried restarting mysql, to no avail.
Eventually I figured it out. When I was in an *interactive
session*, wait_timeout displays as the value of
interactive_timeout. Otherwise, it showed the appropriate value.
Here’s what I found, when interactive_timeout was set to 600 and
wait_timeout was set to 14400 (this is on an analytics server, so
setting the value that high actually makes sense):
[root@mysql1 ~]# mysql -e "show variables like
'interactive_timeout'"
+---------------------+-------+
| Variable_name | Value |
+---------------------+-------+
| interactive_timeout | 600 |
+---------------------+-------+
[root@mysql1 ~]# mysql -e "show variables like
'wait_timeout'" …
[Read more]