本文主要是介绍Spring boot Mysql时区设置 The server time zone value ‘�й���ʱ��‘ is unrecognized or represents more than,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
-
运行报错
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.
-
解决方法
设置
url: jdbc:mysql://localhost:3306/school?serverTimezone=Asia/Shanghai
或者设置url: jdbc:mysql://localhost:3306/school?serverTimezone=GMT%2B8
意为GMT+8(URL编码特殊字符%2B)
-
扩展设置
url: jdbc:mysql://localhost:3306/school?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true
这篇关于Spring boot Mysql时区设置 The server time zone value ‘�й���ʱ��‘ is unrecognized or represents more than的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!