MySql8.0数据库链接报错The driver has not received any packets from the server
1.我使用MySql数据库8.0版本,然后驱动改成了
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/seezoon-framework?useUnicode=true&useSSL=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8
jdbc.username=root
jdbc.password=root
可是结果报错,说是链接数据库超时,我用的数据库连接池是bonecp
<!-- 定义数据源 -->
<bean id="dataSource" class="com.jolbox.bonecp.BoneCPDataSource"
destroy-method="close">
<!-- 数据库驱动 -->
<property name="driverClass" value="${jdbc.driver}" />
<!-- 相应驱动的jdbcUrl -->
<property name="jdbcUrl" value="${jdbc.url}" />
<!-- 数据库的用户名 -->
<property name="username" value="${jdbc.username}" />
<!-- 数据库的密码 -->
<property name="password" value="${jdbc.password}" />
<!-- 检查数据库连接池中空闲连接的间隔时间,单位是分,默认值:240,如果要取消则设置为0 -->
<property name="idleConnectionTestPeriod" value="60" />
<!-- 连接池中未使用的链接最大存活时间,单位是分,默认值:60,如果要永远存活设置为0 -->
<property name="idleMaxAge" value="30" />
<!-- 每个分区最大的连接数 -->
<!--
判断依据:请求并发数
-->
<property name="maxConnectionsPerPartition" value="100" />
<!-- 每个分区最小的连接数 -->
<property name="minConnectionsPerPartition" value="5" />
</bean>
结果就是不行,后来实在是没办法,我把我的MySql8.0卸载了,安装了一个MySql5.6版本的,然后jdbc.properties改成
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/taotao?useUnicode=true&useSSL=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&serverTimezone=GMT%2B8
jdbc.username=root
jdbc.password=root
然后就能启动,并且能成功访问数据了。原来用8.0版本的能正常启动,但是访问不了数据。
难道是数据库版本问题导致,查不到相关的资料,应该是bonecp 这个连接池不支持8.0版本的mysql把,最后也没找到原因,临时办法就是把mysql换成了5.6版本,如果哪位大神了解,可以留言告诉我一下,非常感谢!!!!!!!
MySql8.0数据库链接报错The driver has not received any packets from the server的更多相关文章
- 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.
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure::The ...
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
今天项目中报了如下错误 The last packet sent successfully to the server was 0 milliseconds ago. The driver has n ...
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. (关于jdbc)
The last packet sent successfully to the server was milliseconds ago. The driver has not received an ...
- 【异常】The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
1 详细异常信息 The last packet sent successfully to the server was milliseconds ago. The driver has not re ...
- MySql-8.0.x免安装版下载与配置,Navicat打开数据库链接报错1251的解决办法
若你以前卸载过mysql,小白极大可能没有卸载和删除干净残留,没有卸载干净就肯定重装不成功,可参考https://www.cnblogs.com/Luoters/p/11869032.html 参考与 ...
- mysql异常 : The driver has not received any packets from the server.
异常: 结论:域名写错了或报这个异常
- The driver has not received any packets from the server
解决方法: jdbc的url添加参数: jdbc.url=jdbc:mysql://localhost:3306/totosea?useUnicode=true&characterEncodi ...
- mysql8.0数据库忘记密码时进行修改方法
最近安装mysql8.0数据库,用以前的修改mysql方法,没有成功,所以参考网上前辈的做法,自己重新整理了下忘记密码时进行修改方法 1.安装mysql8.0后发现,在安装目中,是没有my.ini 和 ...
- VS Code远程链接报错Could not establish connection to “hz.matpool.com”
VS Code远程链接报错Could not establish connection to "hz-t2.matpool.com" 输出的部分内容 安装Git git for w ...
随机推荐
- 吸血鬼猎人巴菲第一至八季/全集Buffy迅雷下载
本季看点:<吸血鬼猎人巴菲>故事背景在现代,话说于每一个世代都会出现一个年青的女孩子,在人世间寻找及对付一些妖魔鬼怪,例如有吸血鬼.坏女巫等等邪恶的势力,而这个年青的女孩子则被称为Slay ...
- 《UNIX环境高级编程(第3版)》
<UNIX环境高级编程(第3版)> 基本信息 原书名:Advanced Programming in the UNIX Environment (3rd Edition) (Addison ...
- 微信Access Token 缓存方法
微信Access Token默认缓存是2小时,但是需要特别强调,微信服务号和微信企业号缓存并不相同. (1)微信公众号号:每次Http请求Access Token 系统会返回不同的Token,并附带超 ...
- how to use perf
Since I did't see here anything about perf which is a relatively new tool for profiling the kernel a ...
- Netty Associated -- ChannelPipeline
A list of ChannelHandlers which handles or intercepts inbound events and outbound operations of a Ch ...
- Oracle简单的备份和恢复-导出和导入(2)
ylbtech-Oracle:Oracle简单的备份和恢复-导出和导入(2) 简单的备份和恢复-导出和导入(2) 1. 用户导入导出文件中的一张表(emp)返回顶部 0.1, 我们在sql plus中 ...
- Cantor展开式
X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0! 其中,a为整数,并且0<=ai<i(1<=i<=n).这就是康托展开 ...
- ThinkPHP3.2.3使用分页
首先要搞清楚的就是ThinkPHP3.2.3的分页类已经被移到了Think\Page.class.php,这是跟以前的版本有些不一样的,使用起来还是跟以前版本差不多,但是默认的效果不敢恭维,所以最好是 ...
- GPS精度因子(GDOP,PDOP,HDOP,VDOP,TDOP)
PDOP:位置精度因子(Position Dilution of Precision),直译为“精度强弱度”,通常翻译为“相对误差”.具体含义是:由于观测成果的好坏与被测量的人造卫星和接收仪间的几何形 ...
- 揭秘uc浏览器三
这节我们主要讨论收藏与历史记录页面的边边角角. 首先,看看他的最终的效果图了: 照例了,我们先看看他的布局文件: <!-- tab布局文件 --> <TabHost xmlns:an ...