Mysql 链接数据库时区错误
2024-09-02 19:42:29
错误信息:Error querying database. Cause: 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=UTC即可,这里的时区可以根据自己数据库的设定来设置(GMT/UTC )。
jdbc:mysql://localhost:3306/dbname?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
参考:https://www.cnblogs.com/jeffen/p/6288142.html
最新文章
- html+css+js 模拟win7桌面
- 获取form对象
- Android Studio导入Vitamio多媒体开发框架
- eclipse 中的 jar file 和 runnable jar file的区别
- ZOJ 3866 - Cylinder Candy
- SQL SERVER:开窗函数 SUM() OVER() 数据统计中一例使用
- Unity手游之路<;六>;游戏摇杆之Easy Touch 3教程
- UVa10886 Standard Deviation
- Android Studio经常使用操作技巧(不断更新)
- [Linux] PHP程序员玩转Linux系列-nginx初学者引导
- efcore 配置链接sqlserver 记录
- 关于linux下的文件权限
- 几道很Interesting的偏序问题
- 使用Java实现二叉树的添加,删除,获取以及遍历
- Python常见面试题
- 【Python 10】汇率兑换3.0(while循环)
- 转:LRU算法
- django1.4 简单事例 ,根目录下templates
- springboot注解@SpringBootApplication分析
- UI5-学习篇-9-本地Eclipse UI5应用发布到SAP前端服务器
热门文章
- 深度探索区块链/基于Gossip的P2P数据分发(4)
- mybatis001-动态标签Trim用法
- python基础-9__import__ 反射和面向对象基础 self 封装 继承(多继承顺序) 多态
- type动态创建类
- 【洛谷p1314】聪明的质监员
- Codeforces 1047C (线性筛+因数分解)
- csrf的中间件
- 生产者消费者模型(JoinableQueue)
- 【CF321E】+【bzoj5311】
- LeetCode Lect7 堆及其应用