I am trying to learn more on mysql connections.
Here are few steps I performed.
1) Hit the server API few times and checked.
mysql> SHOW STATUS WHERE variable_name = 'Max_used_connections';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| Max_used_connections | 15 |
+----------------------+-------+
1 row in set (0.00 sec)
2) Then I stopped calling server. And set following 2 rules for mysql.
SET GLOBAL interactive_timeout = 120;
SET GLOBAL wait_timeout = 120;
3) I waited for 2 mins and things do not change.
mysql> SHOW STATUS WHERE variable_name = 'Max_used_connections';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| Max_used_connections | 15 |
+----------------------+-------+
1 row in set (0.00 sec)
I don't understand how can I drop all the inactive connections after a certain period of time?