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的配 ...
随机推荐
- JS 60秒后重发送验证码
//settime($("#getPhoneCode"),60); function settime($obj, time) { if (time == 0) { $obj.att ...
- CentOS7 上学习使用docker
一.CentOS7(64)上安装和使用docker的笔记. 1. 增加docker用户 sudo groupadd docker sudo useradd -g docker docker 2. 增加 ...
- 洛谷P1605走迷宫
传送 这是一道dfs,但是...但是....但是它竟然被放在bfs练习题辣!!!! 打了半天bfs,发现路径不会标记了,于是发现好像有什么不对的,似乎dfs要简单一点,于是半路跑去打dfs,结果打了半 ...
- 理解OpenShift(4):用户及权限管理
理解OpenShift(1):网络之 Router 和 Route 理解OpenShift(2):网络之 DNS(域名服务) 理解OpenShift(3):网络之 SDN 理解OpenShift(4) ...
- MySQL Antelope和Barracuda的区别分析
Antelope是innodb-base的文件格式,Barracude是innodb-plugin后引入的文件格式,同时Barracude也支持Antelope文件格式.两者区别在于: 文件格式 支持 ...
- U3D学习12-黑暗之光实例
1.static勾选后,在scene场景操作后,导致不断烘焙,cpu占用高? 取消自动烘焙 2.UI操作事件 //监听事件增加 mainInputField.onValueChange ...
- Java笔记Spring(三)
spring-beans和spring-context 一.注解 1.自定义一个注解 @Target({ElementType.METHOD}) @Retention(RetentionPolicy. ...
- centos 支持安装libsodium
yum install epel-release -y yum install libsodium -y 然后没了.
- dede织梦后台页面及功能修改精简操作方法
有很多使用织梦程序的站长往往都不喜欢使用默认的后台,但对于很多小白站长其实也不太懂程序的功能,而且如果显示或者开了过多的功能只会给自己带来困扰,所以小白站长都喜欢一些傻瓜式的后台操作界面.那么,ded ...
- Centos6搭建Samba服务并使用Windows挂载
一.安装相关软件 [root@mail ~]# yum install samba samba-client -y #安装相关软件 二.配置匿名访问 [root@mail ~]# cd /etc/sa ...