Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.
Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure 解决方法
一、 5.7版本之前的 mysql连接驱动使用的是
com.mysql.jdbc.Driver
二、 8.0版本之后的mysql连接驱动使用的是
com.mysql.cj.jdbc.Driver
三、出现 Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure 错误,8.0版本之后的url后需补充参数,结果如下:
jdbc:mysql://localhost:3306/spring6?useUnicode=true&characterEncodeing=UTF-8&useSSL=false&serverTimezone=GMT
(图片来源网络,侵删)
(图片来源网络,侵删)
相关阅读:
1、pycharm打不开且报错processing of -javaagent failed, processJavaStart failed 解决
2、【vue3+ts项目】配置eslint校验代码工具,eslint+prettier+stylelint
3、ESlint报错[vue/comment-directive]cleareslint-plugin-vue及Cannot find name ‘template‘.
4、Elasticsearch中父子文档的关联:利用Join类型赋予文档的层级关系
5、【基于Ubuntu下pointnet++激光点云目标检测】保姆级教程 | 环境配置 | 数据集下载 | 修改配置 | 训练以及测试 | 全过程图文by.Akaxi
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。
还没有评论,来说两句吧...