You probably also need to check if interactive_timeout is established - regular client connections probably collect your new settings, but when you check them manually with the interactive client, MySQL sets a timeout from this parameter:
When the thread starts, the wait_timeout value session is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (connect mysql_real_connect () defined by CLIENT_INTERACTIVE). See also interactive_timeout.
For details, see the instruction manual .
source share