[08001] Could not create connection to database server. Attempted reconnect 3 times.
现象描述:
在JetBrains的系列产品中,database连接MySQL数据库时,如Idea、DataGrip、GoLand、Pycharm 等等,连接MySQL数据库时会出现如下提示:
连接失败的信息是:
[08001] Could not create connection to database server. Attempted reconnect 3 times.
原因分析:
造成这个问题的原因是因为数据库驱动包的版本问题,与当前的数据库版本不兼容(我的是mysql5.7版本,而驱动是8.0的版本)
还有一些其他的情况,如提示timeZone不正确(或者是一串乱码)等大部分都是驱动的问题。
问题解决:
方法一:针对版本问题
对于版本问题造成的不兼容的原因,我们可以替换数据库驱动包的版本,如图所以选择对应的Driver版本
测试——>成功
方法二:针对其他情况
对于这种问题,我们需要在链接的URL后面添加参数来屏蔽版本问题带来的影响,具体格式如下:
jdbc:mysql://localhost:3306/{youdatabasename}?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
如图:
连接成功!
[08001] Could not create connection to database server. Attempted reconnect 3 times.相关推荐
- [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.解决办法
pycharm中database连接MySQL数据库时出现如下提示: [08001] Could not create connection to database server. Attempted ...
- 08001] Could not create connection to database server. Attempted reconnect 3 times.
现象描述: 在JetBrains的系列产品中,database连接MySQL数据库时,如Idea.DataGrip.GoLand.Pycharm 等等,连接MySQL数据库时会出现如下提示: 连接失败 ...
- nacos连接mysql出现:Could not create connection to database server. Attempted reconnect 3 times. Giving u
nacos连接mysql出错 今天在学习nacos的时候,在从nacos内嵌数据derby切换到mysql的时候,出现一个错误,特意记一下. org.springframework.jdbc.Cann ...
- 数据库连接失败: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
数据库连接失败信息摘要: ERROR-com.alibaba.druid.pool.DruidDataSource init:927: init datasource error,url: jdbc: ...
- 【Nacos】Nacos MySQL 配置 启动报错 ould not create connection to database server. Attempted reconnect 3 time
文章目录 1.概述 2. 解决方案1-未解决 3. 解决方案2-未解决 4. 解决方案3-未解决 5. 解决方案4-未解决 6. 解决方案6-未解决 7. 解决方案7-解决 1.概述 在章节:[Spr ...
- Connection to @localhost failed. [08001] Could not create connection to database server. Attempt
Connection to @localhost failed. [08001] Could not create connection to database server. Attempt 当我们 ...
- JAVA.SQL.SQLNONTRANSIENTCONNECTIONEXCEPTION: COULD NOT CREATE CONNECTION TO DATABASE SERVER. ATTEMPT
错误信息 java.sql.SQLNonTransientConnectionException: Could not create connection to database server. At ...
- could not create connection to database server.] with root cause
场景 SpringBoot项目运行后提示: 详细提示如下: ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: ...
- JAVA——[MySQLNonTransientConnectionException:Could not create connection to database server.]解决方案
问题描述 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connecti ...
最新文章
- 在用户控件中弹出消息框的方法
- linux怎么修改sftp默认端口,如何在 Linux 系统中如何更改 SFTP 端口
- XML数据读取方式性能比较(一)
- 数据中心网络架构和设计指南
- 云南大学网络课程作业计算机,云南大学842计算机程序设计考研复习经验
- 网站架构之缓存应用(摘录)
- 【opencv学习】透视变换矩阵
- 动画以及View绘制中的addview实战
- 论文推荐 | 一文了解百度10篇ACL 2019概况和该技术的实际可落地应用
- Python 每日一题(计算数值和)
- mikumikudance
- android x86 联网,没有网络连接 – VMWare Fusion上的Android-x86
- 论文投稿 基金名称 标准版 中英文
- Javascript Module Pattern,公共属性不能获取到最新值(Javascript revealing module pattern, public properties)
- android 百度地图系列之添加覆盖物和覆盖物的点击事件
- Cadence orcad 删除元件名称的下划线
- 全景故宫--全景图片展现数字故宫
- Java官方教程目录2021最新版
- 【转】TOEFL写作27分完全攻略
- 当不小心更改了matlab工具箱的内置函数怎么办?以及matlab指定工具箱卸载