c3p0错误:Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new

c3p0连接数据库,连接不上,刚开始不走,过了1分钟直接报错

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 (30). Last acquisition attempt exception: 
java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed

解决办法:
数据库配置的时候加上jdbc.

jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/spring_jdbc?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false
jdbc.username=root
jdbc.password=123456

猜你喜欢

转载自blog.csdn.net/Asdzxc968/article/details/105264421