今天想使用MySQL做SSM,去官網發現更新到了8.0,就想用用,遇到了好多坑
下面是8.0和5.6,5.7的區別:
- jdbc配置文件修改
- MySQL連接jar修改
- 出現Connections could not be acquired from the underlying database!錯誤
jdbc配置文件修改
mysql.driver_class=com.mysql.cj.jdbc.Driver
mysql.connection.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong
mysql.connection.username=root
mysql.connection.password=root
MySQL連接jar修改
要使用新jar包:mysql-connector-java-8.0.11.jar
百度雲:鏈接:https://pan.baidu.com/s/1m3-23tRpWwe6K9fzZb-NZw 密碼:dzdw
出現Connections could not be acquired from the underlying database!錯誤
如果還用5.6和5.7的配置信息,就會出現這個錯誤,把上面兩個修改了這個錯誤就沒了。