现象:客户端连接服务器端mysql是没问题的,所有都木有问题,应用程序配置也没问题,但是连接就抛异常:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver

has not received any packets from the server.

死活修改都不ok,google后,将:

<!--mysql  -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.</version>
</dependency>

版本修改为:5.1.14就OK了。不知道为什么,先mark一下。

mysql连接com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure的更多相关文章

  1. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 解决办法

    09:00:30.307 [http-8080-6] ERROR org.hibernate.transaction.JDBCTransaction -JDBC begin failed com.my ...

  2. 异常解决:Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    异常描述 这个异常通常有如下信息: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failu ...

  3. Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    很长的报错,截取   ERROR c.a.d.p.DruidDataSource - discard connection   com.mysql.jdbc.exceptions.jdbc4.Comm ...

  4. Caused by: java.net.ConnectException: Connection refused/Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    1.使用sqoop技术将mysql的数据导入到Hive出现的错误如下所示: 第一次使用命令如下所示: [hadoop@slaver1 sqoop--cdh5.3.6]$ bin/sqoop impor ...

  5. org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent succ

    数据库 没有开启  连接失败 org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause ...

  6. mysql 5.1超过默认8小时空闲时间解决办法(错误:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure)

    报错: MySQL第二天早上第一次连接超时报错, com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications lin ...

  7. 问题记录——com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    最近在搞一个Spring boot + Mybatis + Mysql的项目,用Mybatis访问数据库时,报了如下的错误,先在网上搜索了,试了各种办法都不行, 奇葩的是,连接另外1个数据库又没问题. ...

  8. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 长时间没连接mysql断开了, ...

  9. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 解决

    感谢大佬:https://blog.csdn.net/a704397849/article/details/93797529 springboot + mybatis多数据库 + druid连接池配置 ...

随机推荐

  1. 1、svn架设、基本命令

    SVN是Subversion的简称,是一个开放源代码的版本控制系统.是一项十分基础,必须能够熟练使用的工具.Apache网站:https://subversion.apache.org/ 采用C/S模 ...

  2. C#中使用lockbits方法处理图像

    转自 使用lockbits方法处理图像(转) 许多图像处理任务即时是最简单的文件类型转换,例如从32位深度到8位深度的格式转化,直接获得像素阵列要比使用GetPixel和SetPixel等方法的效率高 ...

  3. Zedgraph悬停时显示内容闪烁的解决

    中修改 HandleCursorValues 如下形式即可. // weng modified on 20170531 1016 private Point lastMovedPoint; priva ...

  4. Halcon学习之七:改变图像的现实方式和大小

    change_format ( Image : ImagePart : Width, Height : ) 改变Image图像大小,而且ImagePart图像为灰度值图像. crop_domain ( ...

  5. Ryu控制器学习

    Ryu 在Mininet环境下实现Ryu为控制器控制ARP报文的实验中学习了Ryu相关的知识,记录如下 官方文档:http://ryu.readthedocs.io/en/latest/getting ...

  6. linux 系统的后台运行

    后台运行:nohup 程序名 & 杀死后台 ps -ef|grep 名称 kill -9 id(查出的程序id)

  7. 认识Echarts(网址:http://echarts.baidu.com/tutorial.html#ECharts%20%E7%89%B9%E6%80%A7%E4%BB%8B%E7%BB%8D)

    first.html: <!DOCTYPE html><html lang="en"><head> <meta charset=" ...

  8. ORACLE修改表空间方法

    一.使用imp/exp.先导出源库,再创建新库把表空间创建好,然后再导入.(据说这样可以,前提是新的库里面不能有与源库相同名字的表空间.有待验证!) 二.使用脚本进行修改.据目前所了解,正长情况下需要 ...

  9. spring aop两种配置方式

    基于注解的Spring AOP开发 简单案例快速入门 定义目标类接口和实现类 /** * Created by zejian on 2017/2/19.*/ //接口类 public interfac ...

  10. java读取properties配置文件[转]

    网上文章常见的几种读取.properties文件的方式 1.使用java.util.Properties类的load()方法 示例: InputStream in = lnew BufferedInp ...