Changing a system constant variable in MySQL

I added this line to my.ini

wait_timeout=2000000 

When i type

 show global variables 

It prints wait_timeout = 2000000,

but when i type

 show variables 

It prints wait_timeout = 28800

I can install using

 set wait_timeout=2000000 

But I do not want to install it manually all the time.

Do you have any suggestion to set a session system constant?

+4
source share
1 answer

You probably also need to check if interactive_timeout is established - regular client connections probably collect your new settings, but when you check them manually with the interactive client, MySQL sets a timeout from this parameter:

When the thread starts, the wait_timeout value session is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (connect mysql_real_connect () defined by CLIENT_INTERACTIVE). See also interactive_timeout.

For details, see the instruction manual .

+4
source

All Articles