I'm running Windows, IIS, MySQL, PHP.
In my.ini under [mysqld] the value for wait_timeout is set to 60.
wait_timeout = 60
But when I execute the following:
show variables like 'wait_timeout';
It shows me that the value is 28800, which I know is the default.
So I tried to set the value by executing the following:
SET GLOBAL wait_timeout = 60;
But this doesn't seem to work. MySql Workbench tells me "0 rows(s) affected" and when I execute show variables like 'wait_timeout' it still tells me that the value is 28800.
I've also checked interactive_timeout and the story is the same. The value is 28800 and I can't change it.
What am I missing here?
The answer is to set the value without the GLOBAL keyword.
GLOBAL
setting are copied into yourSESSION
settings when you connect. Use either of these syntaxes:wait_timeout
refers to how soon before you will be disconnected. Is that what you want?Furthermore, there is some confusion over "batch" versus "interactive" timeout. Good look.