问题: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. ......的更多相关文章

  1. 报错:java.sql.SQLException: The server

    报错:java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized 在IDEA运行是报出例如相识的错误时: ...

  2. 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized...解决方法

    今天连接mysql数据库报错如下: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or r ...

  3. 连接mysql报错java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized...解决方法

    报错内容: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents mo ...

  4. 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 ...

  5. Spring 连接MySQL报错java.sql.SQLException: Unknown system variable 'tx_isolation'

    先是报错255,这个时候需要把 jdbc:mysql://localhost:3306/projUse 写成 jdbc:mysql://localhost:3306/projUse?useUnicod ...

  6. 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 ...

  7. 在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= ...

  8. NC57访问报错:java.sql.SQLException: Io 异常: Got minus one from a read call

    一.报错信息 1.  前端登录界面 2.  后台应用日志 报错信息一致为: $$callid= $$thread=[Service Monitor and Runtime Enroment] $$ho ...

  9. 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 ...

  10. 连接mysql客户端报错: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'

    报这个错可能是因为用了低版本的的客户端.驱动连接高版本的mysql服务器. 解决方式有三种:升级客户端版本.修改服务端认证方式和适应服务端认证方式. 我是通过升级客户端版本解决,参考一下链接: Upg ...

随机推荐

  1. 2017-9-22 NOIP模拟赛[xxy][数论]

    XXY 的 的 NOIP 模拟赛 4 4 —— 数学专场 A Description定义 f(x)表示 x 的约数和,例:f(12)=1+2+3+4+6+12=28给出 x,y,求Σf(i),i∈[x ...

  2. 基于 Laravel Route 的 ThinkSNS+ Component

    这里是传送门: <ThinkSNS+ 基于 Laravel master 分支,从 1 到 0,再到 0.1[ThinkSNS+研发日记系列一]> <基于 Laravel 开发 Th ...

  3. Ubuntu下安装wine plsql

    在电脑上安装了第二系统Ubuntu,但面临各种Linux不支持的开发软件也是束手无策.比如常用的Eclipse,PlSQl,Oracle,QQ等等,于是,上网查阅各种资料,最终的解决方案还是要依赖于w ...

  4. 微服务监控神器Prometheus的安装部署

    本文涉及:如何在k8s下搭建Prometheus+grafana的监控环境 基本概念 Prometheus提供了容器和云原生领域数据搜集.存储.处理.可视化和告警一套完整的解决方案,最初时是由Soun ...

  5. JMeter(2) 集成jmeter+ant+jenkins

    一.ant安装 $su root $vi /etc/bashrc 插入两行(i+enter插入) export ANT_HOME=/usr/local/apache-ant-1.9.3 export ...

  6. CodeForces - 581B-Luxurious Houses

    The capital of Berland has n multifloor buildings. The architect who built up the capital was very c ...

  7. 紫书140例题6-2 铁轨&&UVa514

    某城市有一个火车站,铁轨铺设如图6-1所示.有n节车厢从A方向驶入车站,按进站顺序编号为1~n.你的任务是判断是否能让它们按照某种特定的顺序进入B方向的铁轨,并驶出车站.例如,出栈顺序(5 4 1 2 ...

  8. 前端CSS(1)

    前端基础CSS(1)   一.css的引入方式 现在的互联网前端分三层: HTML:超文本标记语言.从语义的角度描述页面结构. CSS:层叠样式表.从审美的角度负责页面样式. JS:JavaScrip ...

  9. Yii2.0权限系统,使用PhpManager的方式

    网上搜了一大堆yii2.0权限系统,大抵都是千篇一律,而且基本上都是DbManager.看了半天官方文档之后,终于知道了PhpManager的方式下,是怎么引入权限系统.介绍下我自己的使用.首先,配置 ...

  10. java--时间日期用法

    转载大神 https://www.cnblogs.com/Mr-Lyu/p/5736152.html https://blog.csdn.net/yf198708/article/details/51 ...