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 ...
随机推荐
- VS2010Web默认的浏览器设置和VS里调试JavaScript代码的设置
前言 重装系统后,VS调用的Web浏览器不是IE了,VS调式不了JavaScript代码了.这两天一直在试终于搞定了.这里查找的问题当然主要是VS里面调式JavaScript代码了. 第一种方式设置V ...
- 开源项目PullToRefresh详解(一)——PullToRefreshListView
开源项地址:https://github.com/chrisbanes/Android-PullToRefresh 下拉刷新这个功能我们都比较常见了,今天介绍的就是这个功能的实现.我将按照这个开 ...
- Asp.Net Core 静态文件目录操作
一.默认静态文件处理 Asp.Net Core的默认处理方式,将所有的静态文件都放在wwwroot文件夹中 1.默认配置,在启动文件Startup中 public void Configure(IAp ...
- 聚类:层次聚类、基于划分的聚类(k-means)、基于密度的聚类、基于模型的聚类
一.层次聚类 1.层次聚类的原理及分类 1)层次法(Hierarchicalmethods)先计算样本之间的距离.每次将距离最近的点合并到同一个类.然后,再计算类与类之间的距离,将距离最近的类合并为一 ...
- Intelli公司IDE快捷键设置
自定义快捷键:Keymap 搜索某个像自定义的快捷键,看被占用了没有:搜索时,直接键盘敲击快捷键,比如command+T
- jQuery中attr()和prop()的区别,修改checked属性 jquery attr('checked' 不起作用 attr('checked' 不对
在做复选框全选按钮的时候,出现了一个问题,使用语句$.attr('checked',true),将复选框的属性改为被选中,在chrome浏览器中第一次点击有效后面就不行了,IE8倒是没有问题. 百度了 ...
- CubieBoard 简单入门
大约一个月之前折腾的部分记录,当时没有完全完成,就着手其他事情了,这是存在Live Writer中的草稿,先发出来吧,后来花了一段时间移植Qt,一直遇到了点问题,并没有完全跑通,后续估计也没有时间再继 ...
- HTTPS那些事(三)攻击实例与防御
在<HTTPS那些事(二)SSL证书>我描述了使用SSL证书时一些需要注意的安全问题,在这一篇文章里面我再演示一下针对HTTPS攻击的一些实例,通过这些实例能更安全的使用HTTPS.知己知 ...
- Asp.Net验证控件浅析
ASP.NET公有六种验证控件,分别如下: 控件名 功能描叙 RequiredFieldValidator(必须字段验证) 用于检查是否有输入值 CompareValidato ...
- Windows10 安装Jupyter
官方文档:https://jupyter-notebook.readthedocs.io/en/stable/ https://github.com/jupyter/jupyter/wiki/A-ga ...