【坑】The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
在使用spring JDBC 连接数据库时出现的错误:
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.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
解决办法:在setUrl 数据库后面添加:
?serverTimezone=UTC
【坑】The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.的更多相关文章
- Exception in thread “main” java.sql.SQLException: The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time zone.
Exception in thread “main” java.sql.SQLException: The server time zone value ‘�й���ʱ��’ is unrecogn ...
- idea报错: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 configu
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more tha ...
- The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
介绍 再使用spring操作mysql数据库报错 @Test public void test() { try { //创建连接池,先使用spring框架内置的连接池 DriverManagerDat ...
- 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. 今天有Mys ...
- java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more tha ...
- 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
java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more tha ...
- java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver
SpringBoot运行报错——java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or rep ...
- Javaweb项目中出现java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.异常
javaweb项目中java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represent ...
- 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 ...
随机推荐
- Linux下设置mysql不区分大小写
一.通过命令查看mysql是否是区分大小写的 show variables like '%case_table%'; lower_case_table_names=1(说明是不区分大小写的) lowe ...
- 鲲鹏性能优化十板斧之前言 | 鲲鹏处理器NUMA简介与性能调优五步法
鲲鹏处理器NUMA简介 随着现代社会信息化.智能化的飞速发展,越来越多的设备接入互联网.物联网.车联网,从而催生了庞大的计算需求.但是功耗墙问题以功耗和冷却两大限制极大的影响了单核算力的发展.为了满足 ...
- 大型情感剧集Selenium:2_options设置 #华为云·寻找黑马程序员#
上集回顾 昨天说简单介绍了什么是selenium,它能干what,和发展史与梗概.当的是python如何通过pip安装selenium,并下载对应浏览器的webdriver. 最后简单通过一个Demo ...
- 转:MySQL下载安装、配置与使用(win7x64)
1 第一大步:下载. a.俗话说:“巧妇难为无米之炊”嘛!我这里用的是 ZIP Archive 版的,win7 64位的机器支持这个,所以我建议都用这个.因为这个简单嘛,而且还干净. 地址见图 拉倒最 ...
- react-native 跳转到ios/android 权限设置界面
目录 ios android 1.在android/app/src/main/java/com/<projectname>文件夹下创建opensettings文件夹 2.在opensett ...
- ES6——async函数
目录 1.async 函数是 Generator 函数的语法糖. 2.async函数对 Generator 函数的改进,体现在以下四点. 3.基本用法 一个获取股票报价的函数 指定多少毫秒后输出一个值 ...
- 为什么每一个爬虫工程师都应该学习 Kafka
这篇文章不会涉及到Kafka 的具体操作,而是告诉你 Kafka 是什么,以及它能在爬虫开发中扮演什么重要角色. 一个简单的需求 假设我们需要写一个微博爬虫,老板给的需求如下: 开发爬虫对你来说非常简 ...
- 【转载】Dockerfile文件详解
什么是dockerfile? Dockerfile是一个包含用于组合映像的命令的文本文档.可以使用在命令行中调用任何命令. Docker通过读取Dockerfile中的指令自动生成映像. docker ...
- LightOj-1030 Discovering Gold (期望DP)
You are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave c ...
- 《java面试十八式》--引子
爪哇城中 “喂,你等等我啊”少女气喘吁吁的喊道 “大小姐,你可快点吧,报名马上就要结束了.” 这是爪哇城一年一度的大选比赛,被选上的人会留下来任职,享有名誉和金钱,所以大家都在积极准备. ...