What is actual difference between wait_timeout and interactive_timeout?
One is for interactive sessions, the other is for non-interactive sessions.
What's an interactive session? It's one with a human at the keyboard.
When your code connects to MySQL, runs a query and then spends 3 seconds processing that query before disconnecting, that's 3 seconds of the
When you use the
In both cases, when you or your code runs another query, the waiting time is reset back to 0.
You can see the values for all the current sessions by typing