Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException

已解决

报错信息

Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

在这里插入图片描述
在这里插入图片描述

分析报错信息

InvalidConnectionAttributeException:连接属性异常
The server time zone value:服务器时区值
is unrecognized or represents more than one time zone:无法识别或表示多个时区
You must configure either the server or JDBC driver:您必须配置服务器或JDBC驱动程序
(via the serverTimezone configuration property):通过serverTimezone配置属性
to use a more specifc time zone value if you want to utilize time zone support:如果要利用时区支持,可以使用更具体的时区值

百度错误信息

这里分享一个学习方法
就是说自己一眼看不出来的问题,解决不了的找百度
直接搜索错误信息关键字,基本上前五条就有解决办法
下面是我百度的结果
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

分析百度结果

服务器有时差,需要在连接数据库的配置文件中url后缀加上 ?serverTimezone=Asia/Shanghai

处理方式

在这里插入图片描述

处理结果

启动成功在这里插入图片描述
数据显示
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Mr_Gaojinchao/article/details/117532470