当前位置:网站首页>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’;
边栏推荐
猜你喜欢
随机推荐
Simple factory and factory method mode
Kubernetes three dozen probes and probe mode
libvirt 中体验容器
在CoreOS下部署WordPress实例教程
Qt OpenGL相机的使用
"Jianzhi offer 04" two-dimensional array search
Groovy测试类 和 Junit测试
(database authorization - redis) summary of unauthorized access vulnerabilities in redis
PHP导出word方法(一phpword)
OpenGL shader use
Laravel time zone timezone
(construction notes) learning experience of MIT reading
Visual studio 2022 downloading and configuring opencv4.5.5
Shardingsphere sub database and sub table < 3 >
Socket TCP for network communication (I)
Fluent: Engine Architecture
Colleagues wrote a responsibility chain model, with countless bugs
Use of QT OpenGL camera
Shell: basic learning
DEJA_VU3D - Cesium功能集 之 054-模拟火箭发射全过程




![[learning notes] DP status and transfer](/img/5e/59c64d2fe08b89fba2d7e1e6de2761.png)




