当前位置: 首页 > 工具软件 > manong-ssm > 使用案例 >

mysql could not create connection_刚搭建的 ssm 小项目连接数据库问题,Could not create connection to database server...

司宏伯
2023-12-01

救救孩子!!! 整合 ssm 框架 刚搭起来就没跑通

调了一下午了,已经要砸电脑了:) ,百度了一堆,是在是想不出来哪里有问题

已经尝试的方案:[更换 jdbc 驱动:从 5->8(本地的 mysql 用的 8) , 调整连接 url[时区 ssl 什么的] , Navicat 正常连接]

这是报错信息

17-Oct-2019 21:25:29.051 警告 [RMI TCP Connection(3)-127.0.0.1]org.mybatis.spring.mapper.ClassPathMapperScanner.doScan No MyBatis mapper was found in '[com.manong.mapper]' package. Please check your configuration.

17-Oct-2019 21:25:30.244 严重 [RMI TCP Connection(3)-127.0.0.1] com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl.error init datasource error, url: jdbc:mysql://localhost:3306/test_demo1?serverTimezone=GMT%2B8C&amp&&useSSL=false

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)

at com.mysql.jdbc.Util.getInstance(Util.java:383)

 类似资料: