现象描述:

在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.相关推荐

  1. [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 ...

  2. 08001] Could not create connection to database server. Attempted reconnect 3 times.

    现象描述: 在JetBrains的系列产品中,database连接MySQL数据库时,如Idea.DataGrip.GoLand.Pycharm 等等,连接MySQL数据库时会出现如下提示: 连接失败 ...

  3. 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 ...

  4. 数据库连接失败: 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: ...

  5. 【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 ...

  6. 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 当我们 ...

  7. JAVA.SQL.SQLNONTRANSIENTCONNECTIONEXCEPTION: COULD NOT CREATE CONNECTION TO DATABASE SERVER. ATTEMPT

    错误信息 java.sql.SQLNonTransientConnectionException: Could not create connection to database server. At ...

  8. could not create connection to database server.] with root cause

    场景 SpringBoot项目运行后提示: 详细提示如下: ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: ...

  9. JAVA——[MySQLNonTransientConnectionException:Could not create connection to database server.]解决方案

    问题描述 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connecti ...

最新文章

  1. 在用户控件中弹出消息框的方法
  2. linux怎么修改sftp默认端口,如何在 Linux 系统中如何更改 SFTP 端口
  3. XML数据读取方式性能比较(一)
  4. 数据中心网络架构和设计指南
  5. 云南大学网络课程作业计算机,云南大学842计算机程序设计考研复习经验
  6. 网站架构之缓存应用(摘录)
  7. 【opencv学习】透视变换矩阵
  8. 动画以及View绘制中的addview实战
  9. 论文推荐 | 一文了解百度10篇ACL 2019概况和该技术的实际可落地应用
  10. Python 每日一题(计算数值和)
  11. mikumikudance
  12. android x86 联网,没有网络连接 – VMWare Fusion上的Android-x86
  13. 论文投稿 基金名称 标准版 中英文
  14. Javascript Module Pattern,公共属性不能获取到最新值(Javascript revealing module pattern, public properties)
  15. android 百度地图系列之添加覆盖物和覆盖物的点击事件
  16. Cadence orcad 删除元件名称的下划线
  17. 全景故宫--全景图片展现数字故宫
  18. Java官方教程目录2021最新版
  19. 【转】TOEFL写作27分完全攻略
  20. 当不小心更改了matlab工具箱的内置函数怎么办?以及matlab指定工具箱卸载

热门文章

  1. 这些视频剪辑软件,你觉得哪款最好?
  2. 浙大宁理c语言试卷,电磁场与电磁波教学大纲-浙江大学宁波理工学院教务部.PDF...
  3. 浙大计算机系可以转专业吗,高校转专业越来越开放 浙大给三次机会
  4. 数据管理技术的发展历程
  5. 创建和修改txt文件
  6. php下载xls文件
  7. 英语谚语500句(一)
  8. toString(36)中的36表示进制
  9. ASP - 三种常用分页
  10. 低轨通信卫星: 开启 6G 通信时代,带动千亿规模市场