我跟著教程寫的,為什么執(zhí)行測試類的時候感覺連不上數(shù)據(jù)庫?
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:?
### Error querying database.? Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
### The error may exist in file [/Users/cn40258/demo/target/classes/mapper/AreaDao.xml]
### The error may involve com.imooc.demo.dao.AreaDao.queryArea
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
2018-05-21
同學(xué)好,請檢查你的數(shù)據(jù)庫版本與驅(qū)動的兼容性,建議你使用5.X數(shù)據(jù)庫版本,現(xiàn)在感覺你用了8.0
2018-08-16
?Connections could not be acquired from the underlying database!
2018-06-30
能不能支持我下,幫我解決下,萬分感謝,謝謝!
2018-06-30
我的mysql版本是5.0.22的驅(qū)動試了的是5.0.4以及5.1.34版本的,為什么還是報
Caused by: java.sql.SQLException: No suitable driver
2018-06-03
同遇到了這個問題,感謝老師的回答,我導(dǎo)入了8.0的jar包,而我mysql的版本是5.62的應(yīng)該用5.1的jar包,去官網(wǎng)(https://dev.mysql.com/downloads/connector/j/)? 下載的話要點一下邊上的?Looking for previous GA versions??才能下載到5.1的版本。
2018-05-24
謝謝,問題已解決~