serverTimeZone_the server disconnected before
server The before disconnected
2023-06-13 09:11:12 时间
jdbc连接MySQL时出现The server time zone value ‘?й???’ is unrecognized。。。错误:
https://blog.csdn.net/YaphetS__YJ/article/details/77774874 博文提到:jdbc-mysql6.0以上的版本必须配置serverTimezone参数。我的版本在此之上,构建URL时没配置所以报错
解决办法 1、添加serverTimezone=UTC,运行成功
同样参考上面引用的博文:UTC指全球标准时间,也是mysql服务器使用的时间,而我们的北京时间比它早8个小时,即北京时间=UTC+8:00,所以serverTimezone=UTC还会造成时差问题
2、最好的办法:在my.ini文件的[mysqld]下添加default-time-zone=+8:00,这样就不用每次都手动敲入。 特别注意:重新配置完my.ini后,要关闭mysql服务器然后重启,否则还是报错。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/179035.html原文链接:https://javaforall.cn
相关文章
- Windows server 2012 R2 部署WSUS补丁服务[通俗易懂]
- 【已解决】spring boot项目从mysql中获取数据候错误The driver has not received any packets from the server
- ORA-26747: The one-to-many transformation function string encountered the following error: string ORACLE 报错 故障修复 远程处理
- ORA-32341: The EXPLAIN_MVIEW facility failed to explain the materialized view “string”.”string” ORACLE 报错 故障修复 远程处理
- ORA-46011: The value of the “selectPrivilege” element is too long. ORACLE 报错 故障修复 远程处理
- ORA-48490: The field number exceeds the maximum number [string] ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-010476; Symbol: ER_NDB_NODE_ID_AND_MANAGEMENT_SERVER_INFO; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-01378: The logical block size (string) of file string is not compatible with the disk sector size (media sector size is string and host sector size is string) ORACLE 报错 故障修复 远程处理
- ORA-09928: Unable to restore the label of server ORACLE 报错 故障修复 远程处理
- SQL Server 2005数据库还原错误的经典解决方案
- 启动mysql5.7异常The server quit without updating PID file [FAILED]sql/data/***.pi根本解决方案详解数据库
- 使用VS连接 SQL Server数据库的简单指南(vs连接sqlserver)
- 魔力SQL Server,让你行动如虎(sqlserver吧)
- Windows Server要更名Microsoft Server操作系统?微软辟谣
- Exploring the Dynamic Duo: The Power of Solr MongoDB Integration(solrmongodb)
- Discover the Power of Linux with YLMF: The UserFriendly Operating System(linuxylmf)
- Unveiling the Evolution of Linux: The Journey of the 0.11 Version(linux0.11)
- 桌面型SQL Server:有效管理你的信息宝藏(桌面型sqlserver)
- 合索引深入理解:打开SQL Server组合索引的秘密(打开sqlserver组)
- SQL Server软件故障排查方案实践(sqlserver软故障)
- SQL Server数据库增加一列字段的实现方法(sqlserver加一列)
- 去SQL Server两列之间减法运算(sqlserver两列减)
- 甲,打败SQL Server乙超级武装Oracle甲战胜SQL server乙(exp 武装oracle)