Mysql 8.0版本问题
url加上时区
jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
drivername:driver: com.mysql.cj.jdbc.Driver
密码验证方式更改
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY'MyPass@123';
Flush privileges;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码
FLUSH PRIVILEGES; #刷新权限