IDEA连接数据库错误:[08001] Could not create connection to database server.

用IDEA连接数据库的时候出现以下错误

在这里插入图片描述

我的这个错误的原因是URL后面缺少后缀

这个错误我的解决方法是在URL后面增加后缀:

?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

错误解决:

在这里插入图片描述
后续:我在上网查看此问题的时候发现缺少后缀不是唯一出现这个错误的原因,如果加后缀后也不能解决此问题,请继续尝试其他方法,比如更换驱动(参考链接:https://www.cnblogs.com/xiaobai1202/p/10904371.html )、更新驱动和jar包(参考链接 https://blog.csdn.net/yiye2017zhangmu/article/details/93622976 )等等

  • 3
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up 是一个数据库连接错误的提示。这个错误表示无法连接到数据库服务器并且尝试重新连接了3次,但最终放弃了连接。这个错误通常会出现在尝试使用Idea自带的Database工具连接MySQL数据库时。 解决这个问题的方法是在连接数据库的URL后面拼接?serverTimezone=UTC。这个参数可以解决连接失败的问题。另外,有时候即便连接成功了,数据库也可能不显示表。这个问题可以通过在设置中选择当前的schema来解决。 综上所述,解决[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up错误的方法是在连接URL后面添加?serverTimezone=UTC参数,并在设置中选择当前的schema。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [idea连接MySQL数据库报错:[08001] Could not create connection to database server. Attempted reconnect...](https://blog.csdn.net/gao_jun1/article/details/108213670)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Idea 连接数据库出错Connection to xxx@localhost ... [08001] Could not create connection to database](https://blog.csdn.net/qzy_yyds/article/details/123860329)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [IDEA链接MySQL报错08001和连接成功后不显示表的问题及解决方法](https://download.csdn.net/download/weixin_38695751/14831804)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值