How to set MySQL session wait_timeout from the command line?
问题 As you can see from the output below, I'm using the MySQL shell to change the session's wait_timeout variable to 30 seconds. It works. However, Is there anyway to set this variable from the command line? $ mysql -u root -h 127.0.0.1 -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 48543 Server version: 5.6.39 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered