作爲一名小白,第一次就做Projecct就遇到很多奇奇怪怪的難題。啓動Web項目的過程中,遇到了這樣一個問題
WARN BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@ddfbdac -- 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:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown database 'shop'
造成這個的原因是mysql-connector-jar的jar包版本是否和數據庫版本不一致
jar包是5.0.4,數據庫是8.0.20,將jar包改成8.1.17後能用了,估計是版本相差大,不兼容