JDBC连接数据库报错:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. ......
问题:Java程序使用JDBC连接MySQL数据库时,控制台报错如下:
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 (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
分析:这个表示系统时区的错误,修正时区值就可以了。
解决:在原来的参数“url”后面,拼上这个字符串:?serverTimezone=GMT%2B8
延伸:1 GMT%2B8,即GMT+8,表示东八区。
2 %2B表示“+”,这是因为在URL地址中,只能包含特定的原始字符,其他字符,包括中文等会被编码,但是编码的只是URL地址,如果地址后面还有参数,例如

则,wd属于查询字符串,不属于网址路径。所以可以不用被编码。
参考:https://blog.csdn.net/github_35186068/article/details/80919528
https://blog.csdn.net/chenlycly/article/details/51820727
JDBC连接数据库报错:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. ......的更多相关文章
- 报错:java.sql.SQLException: The server
报错:java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized 在IDEA运行是报出例如相识的错误时: ...
- 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized...解决方法
今天连接mysql数据库报错如下: java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or r ...
- 连接mysql报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized...解决方法
报错内容: java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents mo ...
- dea创建Maven工程用c3p0连接数据库报错java.sql.SQLException: Connections could not be acquired from the underlying
idea java.sql.SQLException: Connections could not be acquired from the underlying database! 转载自:ht ...
- Spring 连接MySQL报错java.sql.SQLException: Unknown system variable 'tx_isolation'
先是报错255,这个时候需要把 jdbc:mysql://localhost:3306/projUse 写成 jdbc:mysql://localhost:3306/projUse?useUnicod ...
- Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to connect
Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to co ...
- 在mybatis中使用存储过程报错java.sql.SQLException: ORA-06550: 第 1 行, 第 7 列: PLS-00905: 对象 USER1.HELLO_TEST 无效 ORA-06550: 第 1 行, 第 7 列:
hello_test是我的存储过程的名字,在mapper.xml文件中是这么写的 <select id="getPageByProcedure" statementType= ...
- NC57访问报错:java.sql.SQLException: Io 异常: Got minus one from a read call
一.报错信息 1. 前端登录界面 2. 后台应用日志 报错信息一致为: $$callid= $$thread=[Service Monitor and Runtime Enroment] $$ho ...
- Mybatis 报错java.sql.SQLException: No suitable driver found for http://www.example.com
运行项目报错 Error querying database. Cause: java.sql.SQLException: No suitable driver found for http://ww ...
- 连接mysql客户端报错: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'
报这个错可能是因为用了低版本的的客户端.驱动连接高版本的mysql服务器. 解决方式有三种:升级客户端版本.修改服务端认证方式和适应服务端认证方式. 我是通过升级客户端版本解决,参考一下链接: Upg ...
随机推荐
- BZOJ2388:旅行规划(travel)——分块凸包
题目 OIVillage 是一个风景秀美的乡村,为了更好的利用当地的旅游资源,吸引游客,推动经济发展,xkszltl 决定修建了一条铁路将当地 $n$ 个最著名的经典连接起来,让游客可以通过火车从铁路 ...
- PV、UV、VV、IP是什么意思?
PV.UV.VV.IP作为网站分析中最常见的基础指标,能够从宏观概括性地衡量网站的整体运营状况,也是检测网站运营是否正常的最直观的指标. 1.VV(来访次数/访问次数):VisitView 记录所有访 ...
- MyBatis二级缓存配置
正如大多数持久层框架一样,MyBatis 同样提供了一级缓存和二级缓存的支持 Mybatis二级缓存是SessionFactory,如果两次查询基于同一个SessionFactory,那么就从二级缓存 ...
- java基础笔记(三)——main方法
1.解析public static void main(String[] args)方法 JVM在运行程序时,会首先查找main()方法作为入口,main是JVM识别的特殊方法名. public是权限 ...
- css 文本溢出时显示省略号
.text-ellipsis { width:100px; height:60px; overflow: hidden;//隐藏滚动条 text-overflow:ellipsis; white-sp ...
- 1e9个兵临城下(容斥原理)
链接:https://ac.nowcoder.com/acm/contest/321/A 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536 ...
- PHP EXCEL相关
这次的需求是在二次扫描的EXCEL报表中加入一列扫描时间. 扫描的时间之前已经写进日志里了,这次要做的就是把时间读取出来然后作为一列插入报表.其实日志也已经读出来了,要做的就是插入.但插入还是碰到不少 ...
- Net Core -- 配置Kestrel端口
Net Core -- 配置Kestrel端口 Kestrel介绍 在Asp.Net Core中,我们的web application 其实是运行在Kestrel服务上,它是一个基于libuv开源的跨 ...
- NET Core写了一个轻量级的Interception框架[开源]
NET Core写了一个轻量级的Interception框架[开源] ASP.NET Core具有一个以ServiceCollection和ServiceProvider为核心的依赖注入框架,虽然这只 ...
- setTimeout的异步传输机制
setTimeout是异步的,在设置完setTimeout后,指定代码会在设定的时间后加入到任务队列,但并不是立即执行,js是单线程语言,所有的代码按顺序执行,即同步执行,同步执行的代码放在执行队列中 ...