Connection lost: The server closed the connection
想必很多初学者都会遇到这个问题
其实很简单.mysql有个机制,就是8小时无通信,myslq就会自动关闭数据;

解决方案(2选1):
或者:
1.定时去做一个查询,就是 select * from XXX;
或者:
2.修改配置文件:
wait_timeout=31536000
interactive_timeout=31536000
其实这个问题.我是很早就注意了,,不过这次因为对数据库有多个连接,所有调试信息打印的这个,确实是8小时无消息.教训啊!!
Connection lost: The server closed the connection的更多相关文章
- amqp server closed the connection. check login credentials socket closed
rabbit, [ {default_user, <<"guest">>}, {default_pass, <<"guest" ...
- FTP response 421 received. Server closed connection
现象: 在springboot的定时器轮询去下载ftp文件时,报以下错误: org.apache.commons.net.ftp.FTPConnectionClosedException: FTP r ...
- AMQP server localhost:5672 closed the connection. Check login credentials: Socket closed
2016-04-13 09:23:38.755 18850 INFO oslo.messaging._drivers.impl_rabbit [req-fafc8542-9403-4b5a-89d2- ...
- [杂]SQL Server 之 Understanding Connection Pooling and Transactions
A SqlConnection consists of two parts: the public instance that your code interacts with (the outer ...
- 解决Lost connection to MySQL server during query错误方法
昨天使用Navicat for MySQL导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询 ...
- Bind 远程连接DNS服务器时出现 rndc: connection to remote host closed
使用命令:rndc -s 192.168.1.2 status 连接远程的bind 搭建的DNS服务器时出现下面的错误: rndc: connection to remote host close ...
- 解决Lost connection to MySQL server during query错误方法/Mysql关闭严格模式
使用Navicat 导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询过程中丢失连接到MyS ...
- Data source rejected establishment of connection, message from server: "Too many connections"解决办法
异常名称 //数据源拒绝从服务器建立连接.消息:"连接太多" com.MySQL.jdbc.exceptions.jdbc4.MySQLNonTransientConnection ...
- MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...
随机推荐
- Linux scp命令详解
Linux scp命令 Linux scp命令用于Linux之间复制文件和目录. scp是 secure copy的缩写, scp是linux系统下基于ssh登陆进行安全的远程文件拷贝命令. 语法: ...
- docker基本命令使用
学会使用docker命令帮助 docker help 子命令 查看docker镜像 docker images 搜索镜像 docker search 镜像名 下载镜像 docker pull 镜像名 ...
- 第一天Python
一.开发语言 高级语言:Python Java.PHP 高级语言--字节码(PHP适用于写网页) 低级语言:C.汇编--机器码(底层开发,根本,效率低) 二.Python种类 三.安装
- BCC校验小知识
BCC校验其实是奇偶校验的一种,但也是经常使用并且效率较高的一种.所谓BCC校验法,就是在发送前和发送后分别把BCC以前包括ETX字符的所有字符按位异或后,按要求变换(增加或去除一个固定的值)后所得到 ...
- 多版本opencv管理; find_package()的原理解析
近期用cmake编译程序时,报错找不到opencv2.由于我电脑里安装了多个版本的opencv,管理不善,借此机会梳理一下思路. 1. Cmake -- find_package(Opencv REQ ...
- plot
scatter import pandas as pd df_train=pd.read_excel(r"C:\Users\Liugengxin\Desktop\回归.xlsx") ...
- 2017-2018-2 20165312实验二《Java面向对象程序设计》实验报告
2017-2018-2 20165312实验二<Java面向对象程序设计>实验报告 实验中遇到的问题 1.增加MyUtil的测试类之后,TestCase是红色的,但是没有找到junit.j ...
- 记一次sshd启动报错,Failed to start OpenSSH server daemon.
sshd -t [root@mysql5-slave proj]# sshd -t @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
- 关于offsetParent
不知道有多少人知道JavaScript中有offsetParent这么个属性. 关于offsetParent,我最开始见到他,是在<JavaScript高级程序设计(第3版)>第321页, ...
- android 开发 View _13 绘制图片与BitmapShader位图的图像渲染器
BitmapShader位图的图像渲染器 TileMode 模式 Shader.TileMode.CLAMP 边缘拉伸. Shader.TileMode.MIRROR 在水平方向和垂直方向交替景象, ...