Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

global vs. session variables

Status
Not open for further replies.

tenaciousd3041

Technical User
Sep 14, 2006
2
US
Hi All,

I have a question regarding setting my session variable. I want to set the wait_timeout value to 600 for both global and session variables.

I put this in my my.cnf file:
wait_timeout = 600

bounced mysql and then logged back into a new session. The 600 value is set for global wait_timeout:

mysql> show GLOBAL VARIABLES LIKE 'wait%';
+---------------+----------+
| Variable_name | Value |
+---------------+----------+
| wait_timeout | 600 |
+---------------+----------+

BUT the session variable is still set to :

mysql> show VARIABLES LIKE 'wait%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout | 28800 |
+---------------+-------+


How can i get the session variable to take the global value as the default??? I don't want to have to issue the 'set session variable' command in each session.

Any feedback would be greatly appreciated.
 
i figured it out. The session variable for wait_timeout was set to the global value for interactive_timeout instead of the global value for wait_timeout. I set the global interactive_timeout variable to the value i need and all worked well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top