The server time zone value ‘?й???’ is unrecognized or represents more than one time zone. You must c

简介: 报错信息如下: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.

链接MySql数据库是报错

报错信息如下: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.


在写SpringBoot链接MyBitis时,运用了Durid的数据库连接池,在连接数据库的时候突然报错,搜了一下,具体的解决办法就是:

在jdbc连接的url后面加上serverTimezone=UTC或GMT即可,如果需要指定使用gmt+8时区,需要写成GMT%2B8,不然可能会报错误,解析为空。

例子如下:

spring.datasource.url=jdbc:mysql://localhost:3306/book?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
相关文章
|
人工智能 自然语言处理 机器人
向量化与嵌入模型:RAG系统背后的隐形英雄
传统搜索只懂字面不懂含义,向量化技术让AI真正理解语言。从日常类比到实际案例,揭秘为何向量化技术是RAG的灵魂,以及如何用最少的努力构建最聪明的AI应用。
1181 10
|
机器学习/深度学习 人工智能 自然语言处理
OpenSearch 视频 RAG 实践
本文介绍了 OpenSearch LLM 版中视频 RAG 的具体实现流程。
1480 4
|
11月前
|
Ubuntu 安全 Java
Docker 拉取部署 OpenJDK 全指南:替代方案、实操步骤与最佳实践
本文详解Docker部署OpenJDK全流程:搭建环境、选择eclipse-temurin等替代镜像,避开已弃用的官方镜像,通过Dockerfile构建应用,配置JVM参数与容器资源限制,并提供最佳实践与问题排查方案,助力企业级Java应用高效、安全运行。
5219 2
|
关系型数据库 MySQL Java
超详解The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone
超详解The server time zone value ‘�й���׼ʱ��‘ is unrecognized or represents more than one time zone
1450 0
|
机器学习/深度学习 网络协议 网络安全
|
2天前
|
监控 网络协议 算法
2026年起SSL证书有效期逐年缩短:企业如何避免“续期风暴”!
SSL证书有效期将从2026年起分三阶段逐步缩短至47天,人工续期难以为继。阿里云“WoSign SSL证书+自动化服务”,支持域名监控、自动托管、云产品/服务器一键部署及智能提醒,助力企业高效应对高频续期挑战。
8076 2
|
11天前
|
域名解析 人工智能 Linux
|
19天前
|
人工智能
Google 提示「所在地区不可用」?进不去 Antigravity 或 Gemini,先查账号这个设置
进不去 Antigravity 或 Gemini,提示所在地区不可用?三步查清 Google 账号关联地区、官方更正表单理由选法与改区注意事项。
10235 13
Google 提示「所在地区不可用」?进不去 Antigravity 或 Gemini,先查账号这个设置