mysql 8.0 url配置

在连接数据库配置都没错,jar包也有,但是还是报
Could not create connection to database server.错误,那是因为mysql8.0版本的使用的数据库连接字符串不一样,而且还对时区有要求,引用下面的连接即可
url: jdbc:mysql://localhost:3306/hao?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
driver: com.mysql.cj.jdbc.Driver

posted @ 2020-06-25 22:50  learning豪  阅读(1196)  评论(0编辑  收藏  举报