当前位置:网站首页>【MySQL】MySQL时区问题、数据库时间相差8小时问题解决
【MySQL】MySQL时区问题、数据库时间相差8小时问题解决
2022-07-28 05:16:00 【Ctrl练习生-谢哥哥blog】
解决:修改MySQL系统时区,改为东8区。
在命令行界面或者可视化工具下(如:Navicat)依次运行以下命令。
1、查询当前系统时间
select now();
2、检查MySQL系统时区
show variables like '%time_zone%';
3、设置时区
set global time_zone = '+08:00'; // 修改mysql全局时区为北京时间,即我们所在的东8区
set time_zone = '+08:00'; // 修改当前会话时区
4、立即刷新生效
flush privileges;
命令执行完毕之后再次查询时区是否正确
写在最后
谢谢你的点击与阅读,如果文章对你有帮助的话,请动动您发财的小手点个小赞、收藏或者关注博主一下,谢谢!一心原创,为了后人乘凉。
边栏推荐
- The solution after the samesite by default cookies of Chrome browser 91 version are removed, and the solution that cross domain post requests in chrome cannot carry cookies
- How to send and receive reports through outlook in FastReport VCL?
- Internal implementation principle of yymodel
- First acquaintance with C language (1)
- Activation functions sigmoid, tanh, relu in convolutional neural networks
- Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 2)
- Using RAC to realize the sending logic of verification code
- 【ARXIV2205】EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformers
- Check box error
- ArrayList多线程安全解决办法
猜你喜欢

From the basic concept of micro services to core components - explain and analyze through an example

【ARXIV2204】Vision Transformers for Single Image Dehazing

这种动态规划你见过吗——状态机动态规划之股票问题(中)

Test Development - UI testing in automated testing

HashSet add

Visual studio 2019 new OpenGL project does not need to reconfigure the environment

【ARXIV2205】Inception Transformer

MySQL practice 45 lectures
![[internal mental skill] - creation and destruction of function stack frame (C implementation)](/img/a9/81644ee9ffb74a5dc8ff1bc3977f49.png)
[internal mental skill] - creation and destruction of function stack frame (C implementation)
![[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme](/img/e3/f9c6bfdbcd5dffd406e3f1d2331050.png)
[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme
随机推荐
Database date types are all 0
Eccv2022 | 29 papers of Tencent Youtu were selected, including face security, image segmentation, target detection and other research directions
微服务故障模式与构建弹性系统
ArrayList多线程安全解决办法
From the basic concept of micro services to core components - explain and analyze through an example
What are the methods of array objects in Es5 and what are the new methods in ES6
Mysql基本查询
HDU 3585 maximum shortest distance
【ARXIV2203】CMX: Cross-Modal Fusion for RGB-X Semantic Segmentation with Transformers
MySQL 默认隔离级别是RR,为什么阿里等大厂会改成RC?
【ARXIV2205】EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformers
The solution after the samesite by default cookies of Chrome browser 91 version are removed, and the solution that cross domain post requests in chrome cannot carry cookies
JSON in JS (launch object deep copy)
如何在 FastReport VCL 中通过 Outlook 发送和接收报告?
Table image extraction based on traditional intersection method and Tesseract OCR
HDU 1530 maximum clique
Professor dongjunyu made a report on the academic activities of "Tongxin sticks to the study of war and epidemic"
yandex robots txt
分享几种管理C程序中标志位的方法
POJ 2763 housewife wind (tree chain partition + edge weighting point weight)