当前位置:网站首页>MySQL time zone solution
MySQL time zone solution
2022-07-03 12:07:00 【Dull Yanan】
Add... After the connection string ?serverTimezone=UTC
among UTC It's universal time .
Complete connection string example :jdbc:mysql://localhost:3306/test?serverTimezone=UTC
Or there's another option :jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8, This is to solve the problem of Chinese random code input , Of course, it can also be combined with the above :jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
perhaps
?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
If the problem cannot be solved, execute it in the database sql sentence :
Or directly at cmd-mysql perform
show variables like ‘%time_zone%’;
set global time_zone=’+08:00’;
边栏推荐
猜你喜欢
ArcGIS application (XXI) ArcMap method of deleting layer specified features
Vulnhub's presidential
XML (DTD, XML parsing, XML modeling)
Shardingsphere sub database and sub table < 3 >
shardingSphere分库分表<3>
Groovy测试类 和 Junit测试
(构造笔记)ADT与OOP
小鹏 P7 撞护栏安全气囊未弹出,官方回应称撞击力度未达到弹出要求
Basic knowledge of OpenGL (sort it out according to your own understanding)
vulnhub之Ripper
随机推荐
Oracle advanced (I) realize DMP by expdp impdp command
libvirt 中体验容器
Why can't my MySQL container start
STL tutorial 10 container commonalities and usage scenarios
OpenGL shader use
抓包整理外篇fiddler———— 会话栏与过滤器[二]
Vulnhub's presidential
(构造笔记)从类、API、框架三个层面学习如何设计可复用软件实体的具体技术
vulnhub之tomato(西红柿)
win10 上PHP artisan storage:link 出现 symlink (): Protocol error的解决办法
Cacti监控Redis实现过程
Capturing and sorting out external Fiddler -- Conversation bar and filter [2]
Colleagues wrote a responsibility chain model, with countless bugs
C language improvement article (wchar_t) character type
Groovy test class and JUnit test
Talk about the state management mechanism in Flink framework
4000 word super detailed pointer
vulnhub之Nagini
【mysql专项】读锁和写锁
Experience container in libvirt