MySQL解决8小时内没有进行数据库操作, mysql自动断开连接, 需要重启tomcat的问题 在my.cnf中加入: [mysqld] wait_timeout=604800 interactive_timeout=604800 设置为7天