想必很多初学者都会遇到这个问题

其实很简单.mysql有个机制,就是8小时无通信,myslq就会自动关闭数据;

解决方案(2选1):

或者:

1.定时去做一个查询,就是 select * from XXX;

或者:

2.修改配置文件:

wait_timeout=31536000
interactive_timeout=31536000

其实这个问题.我是很早就注意了,,不过这次因为对数据库有多个连接,所有调试信息打印的这个,确实是8小时无消息.教训啊!!

Connection lost: The server closed the connection的更多相关文章

  1. amqp server closed the connection. check login credentials socket closed

    rabbit, [ {default_user, <<"guest">>}, {default_pass, <<"guest" ...

  2. FTP response 421 received. Server closed connection

    现象: 在springboot的定时器轮询去下载ftp文件时,报以下错误: org.apache.commons.net.ftp.FTPConnectionClosedException: FTP r ...

  3. 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- ...

  4. [杂]SQL Server 之 Understanding Connection Pooling and Transactions

    A SqlConnection consists of two parts: the public instance that your code interacts with (the outer ...

  5. 解决Lost connection to MySQL server during query错误方法

    昨天使用Navicat for MySQL导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询 ...

  6. Bind 远程连接DNS服务器时出现 rndc: connection to remote host closed

    使用命令:rndc -s 192.168.1.2 status 连接远程的bind 搭建的DNS服务器时出现下面的错误:   rndc: connection to remote host close ...

  7. 解决Lost connection to MySQL server during query错误方法/Mysql关闭严格模式

    使用Navicat 导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询过程中丢失连接到MyS ...

  8. Data source rejected establishment of connection, message from server: "Too many connections"解决办法

    异常名称 //数据源拒绝从服务器建立连接.消息:"连接太多" com.MySQL.jdbc.exceptions.jdbc4.MySQLNonTransientConnection ...

  9. MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0

    最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...

随机推荐

  1. 关于DDR3控制器的使用

    关于DDR3控制器的使用 mig_7series_0 u_mig_7series_0 ( // Memory interface ports .ddr3_addr (ddr3_addr), // ou ...

  2. html 之 <meta> 标签之http-equiv

    语法规则: <meta http-equiv=“参数” content=“参数值” > 1.X-UA-Compatible 文档兼容模式的定义 <meta http-equiv=“X ...

  3. MyEclipse 10 + OsChina GIt项目托管

    环境:Egit+MyEclipse 10,此教程默认MyEclipse 10和Egit都已经配置好. 1.注册OsChina Git账号,网址:http://git.oschina.net/,具体注册 ...

  4. psi

    purchase 采购sales 销售inventory 库存 outstock/instock/inventory taking outstock/instock/inventory 出库 入库 盘 ...

  5. 使用redis-cli --pipe快速插入数据

    具体实现步骤如下:(参考http://www.cnblogs.com/ivictor/p/5446503.html) 1. 新建一个文本文件redis_commands.txt,包含redis命令 S ...

  6. 《从零玩转python+人工智能-3》网易云课堂王顺子

    #1.145——152节课25章——面向对象三大特性小案例 class Animal: def __init__(self,name,age=1): self.name = name self.age ...

  7. [Linux] traceroute 路由跟踪指令用例

    traceroute是用来跟踪数据包到达网络主机所经过的路由工具.在Linux系统中,称之为traceroute,在Windows中称为tracert. 一条路径上的每个设备traceroute要测3 ...

  8. JEECG-Swagger UI的使用说明

    一.代码生成 (此步骤为代码生成器的使用,如不清楚请查阅相关文档视频) 1.进入菜单[在线开发]-->[Online表单开发],选中一张单表/主表,点击代码生成按钮. 2.弹出页面中填写代码生成 ...

  9. TCC细读 - 1 例子流程

    http://www.iocoder.cn/categories/TCC-Transaction/ https://github.com/changmingxie/tcc-transaction 细读 ...

  10. ArcGIS自定义工具箱-字段合并

    ArcGIS自定义工具箱-字段合并 联系方式:谢老师,135-4855-4328,xiexiaokui#qq.com 目的:用指定字符合并两个字段 用例:湖南/长沙=>湖南省长沙市 数据源: 使 ...