The web interface for accounting / time tracking software (Clients and Profits X) requires a open connection to its mysql database. Right now the web interface is not used on a regular basis and this times out. When someone DOES want to use the web interface it is broken at that point until I restart the program.
I am trying to set the max_timeout in mysql on a OSX Snow Leopard server to 5 days but it keeps resetting to the default of 8hrs. You can see from the following code snippits that I set both the global and session variables but after I exit and log back into mysql the session variable is reset. I do not pretend to be an expert with SQL so I may just be being stupid. This is on a OSX SL Server although I do not know if its specific to this platform or not.
mysql> set wait_timeout=432000;
Query OK, 0 rows affected (0.00 sec)
mysql> set global wait_timeout=432000;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW VARIABLES LIKE 'wait%';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| wait_timeout | 432000 |
+---------------+--------+
1 row in set (0.00 sec)
mysql> SHOW GLOBAL VARIABLES LIKE 'wait%';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| wait_timeout | 432000 |
+---------------+--------+
1 row in set (0.00 sec)
mysql> exit
Bye
osxserver:~ admin$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.92-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW VARIABLES LIKE 'wait%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout | 28800 |
+---------------+-------+
1 row in set (0.00 sec)
mysql> SHOW GLOBAL VARIABLES LIKE 'wait%';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| wait_timeout | 432000 |
+---------------+--------+
1 row in set (0.00 sec)
I have the wait_timeout set in /etc/my.cnf under [mysqld] although I am unsure if this sets the session variable or the global variable
server:~ admin$ grep wait_timeout /etc/my.cnf
wait_timeout = 432000