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 ...
最新文章
- 川教版计算机三年级下册教案,川教版小学三年级下册信息技术教案(全册)
- java可以使用c语言中的输入,c语言中的scanf在java中应该怎么表达,Scanner类。
- NioEventLoop启动流程源码解析
- git -- 练习的笔记
- spring作业_Spring和石英:多作业计划服务
- 前端学习(2964):路由的实现
- 【转载】C++ function、bind和lambda表达式
- swift中闭包的循环引用
- MAC编译的JDK执行出错: [libjvm.dylib+0x482a49] PerfDataManager::destroy()+0xab
- 计算机网络谢希仁第七版课后习题答案
- html纯白色代码,想用纯白的背景代码。
- < abbr >标签 缩写
- win10 u盘 修复计算机,u盘启动修复Win10引导文件丢失的方法
- 【Excel】乱序不同行数的两列数据对比匹配
- 《一键下单:杰夫·贝佐斯与亚马逊的崛起》—— 读后总结
- 【Bioinfo Blog 012】【R Code 010】——生存分析(Kaplan-Meier Cox)
- C/C++基础 sleep()、usleep()、nanosleep()的用法
- Lecture 22
- JVM(Java虚拟机模型、Java运行时数据区模型)
- 响应式手机商城页面顶部样式HTML代码