4

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 set with

set wait_timeout=2000000

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

Do you have any suggestion to set permanently session system variable?

1
  • Remember to restart MySQL after changing my.ini Commented Sep 6, 2010 at 6:53

1 Answer 1

4

You probably need to check the interactive_timeout is set also - regular client connections are probably picking up your new setting, but when you check it manually using an interactive client, MySQL will set the timeout from this setting:

On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()). See also interactive_timeout.

See manual for details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.