SpringBoot连接MySQL时遇到ERROR 1045 (28000): Access denied for user ‘root‘@’localhost’ (using password: YES)
在yml配置文件中,数据库连接的url为
1 | url: jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=utf8 |
报错,可能是Maven的依赖导入包冲突的原因,后续在加上时区即可
1 | url: jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT |