java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä'
生活随笔
收集整理的這篇文章主要介紹了
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä'
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
java.sql.SQLException: The server time zone value ‘?D1ú±ê×?ê±??’ 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.
解決方案01:
登錄數據庫,執行下面這2條命令:
show variables like '%time_zone%'; set global time_zone='+8:00';
解決方案02:
在數據庫名后拼接如下設置:
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL例如:
spring:datasource:hikari:driver-class-name: com.mysql.cj.jdbc.Driverjdbc-url: jdbc:mysql://localhost:3306/數據庫名?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8username: rootpassword: root總結
以上是生活随笔為你收集整理的java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä'的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ESLint is disabled s
- 下一篇: IDEA图形化操作git