逆向生成工具连接数据库报错

逆向生成工具连接数据库报错

相关截图:

https://img1.sycdn.imooc.com//climg/64d5f95209ab610a28781720.jpg

问题描述:

Fri Aug 11 16:55:19 CST 2023 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure


正在回答

登陆购买课程后可参与讨论,去登陆

2回答

ssl配置加flase试试看,另外你的数据库是哪个版本呀?

  • 甘炽文 提问者 #1

    数据库版本是8.0.21,pom.xml里的依赖也尝试改为8.0.21了,加了?useSSL=false,会显示以下报错

    https://img1.sycdn.imooc.com//climg/64d603d609f32ab828601564.jpg

    2023-08-11 17:48:11
  • 风间影月 回复 提问者 甘炽文 #2
    驱动不匹配,换成mysql8的试试看
    2023-08-11 18:02:49
提问者 甘炽文 2023-08-11 17:30:29

https://img1.sycdn.imooc.com//climg/64d5ff3409c7ee1c11220622.jpg

我电脑安装的是8.0.21的数据库,尝试在pom.xml文件中将mysql依赖改版本为

mysqlmysql-connector-java8.0.21

依然还会报错

https://img1.sycdn.imooc.com//climg/64d5ffb1097088e727441708.jpg

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师