今天想使用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的配置信息,就会出现这个错误,把上面两个修改了这个错误就没了。