Reason: mysql5 defaults the wait_timeout of its connection to 8 hours
modify the configuration file. The steps are as follows:
【1】 Log in to MySQL and CMD
MySQL – H host address – U user name – P user password (for example, MySQL – hlocalhost – uroot – p123456)
【2】 View wait_ Timeout, CMD command:
show global variables like ‘wait_ timeout’;
[3] if wait_ Timeout is too small to be modified. CMD command:
set global wait_ timeout=604800;
set global interactive_ timeout=604800;
after modification, you can test.
Read More:
- Resolve the exception MySQL lontransientconnectionexception: communications link failure during rollback()
- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure (How to Fix)
- When executing hive – f script com.mysql.jdbc . exceptions.jdbc4 .CommunicationsException: Communications link failure
- SQL Error: 0, SQLState: 08S01 & Communications link failure
- Sqoop import error communications link failure
- The problem of MySQL database connection failure errno: 1049 error
- Communication link failure when connecting Doris
- (error when importing database): MySQL 2006-mysql server has gone away
- Solve the database connection failure of Discuz! Database error (1045) notconnect Forum
- An error is reported when kettle connects Oracle database and MySQL database
- Solution to communication link failure with error in idea startup project
- How to solve MySQL error 1049 (42000): unknown database ‘database’
- When the springcloud obtains the cloud link database information, an error is reported: errorcode 1045, state 28000
- How to Fix Exception in thread “main“ com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
- Link: fatal error lnk1123: failure during conversion to coff: file in
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- django.core.exceptions . improveconfigured: error loading MySQL DB module. Django configuring MySQL database
- Solve MySQL installation error: initializing database prompts an error when installing mysql
- PHP link database error PHP_ network_ getaddresses: getaddrinfo failed: Name or service not known
- MySQL appears: ERROR 1049 (42000): Unknown database’XXX’ solution