spring容器配置如下,无法解决数据库连接

解决无法获取数据库连接:java.sql.SQLException: Connections could not be acquired from the underlying database

再继续排查,导入的jar包是mysql-connector-java5.1.6

解决无法获取数据库连接:java.sql.SQLException: Connections could not be acquired from the underlying database

通过mysql的jar包和连接数据库必备信息都匹配,还是无法解决

解决无法获取数据库连接:java.sql.SQLException: Connections could not be acquired from the underlying database

捣鼓了好久,由于自己的mysql是8.0版本和驱动包mysql-connector-java-5.1.6不匹配,导致无法连接数据库重新导入驱动包mysql-connector-java-8.0.16,然后driverClass改为红框的内容,然后解决了此问题,无法连接数据库的问题

解决无法获取数据库连接:java.sql.SQLException: Connections could not be acquired from the underlying database解决无法获取数据库连接:java.sql.SQLException: Connections could not be acquired from the underlying database

相关文章: