问答详情
源自:4-4 基于myBatis实现DAO编程(上)

测试时候遇到数据库连接问题

警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6ad57b45 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (2). Last acquisition attempt exception: 

java.sql.SQLException: Access denied for user '宋士虓'@'localhost' (using password: YES)


Caused by: org.apache.ibatis.exceptions.PersistenceException: 

### Error updating database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from 


以上是报错,大致意思我理解是数据库连接超时之类的,网上也找过问题,但基本都不是。希望同遇到过该问题的同学可以帮我解答一二

提问者:沉寂守望者 2019-10-12 20:22

个回答

  • 正能量发射器
    2020-03-09 18:24:08

    我也是这个问题