Exception in thread "main" java.sql.SQLException: Connections could not be acquired from the underlying database!
<pre name="code" class="html">Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
这是链接不到数据库,原因多种,我遇到一种,就是我的数据库没有设置密码,而我设置了密码去使用
user=root
password=123
driverclass=com.mysql.jdbc.Driver
jdbcurl=jdbc:mysql://localhost:3306/hibernate后来改成无密码,则对上了
user=root
password=
driverclass=com.mysql.jdbc.Driver
jdbcurl=jdbc:mysql://localhost:3306/hibernate
本文介绍了一种因数据库密码配置不当导致的应用程序无法连接数据库的问题,并提供了正确的配置示例。
2638

被折叠的 条评论
为什么被折叠?



