当前位置:网站首页>【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;
命令执行完毕之后再次查询时区是否正确
写在最后
谢谢你的点击与阅读,如果文章对你有帮助的话,请动动您发财的小手点个小赞、收藏或者关注博主一下,谢谢!一心原创,为了后人乘凉。
边栏推荐
- [slam] lvi-sam analysis - Overview
- Clickhouse填坑记2:Join条件不支持大于、小于等非等式判断
- Tips for using swiper (1)
- Message forwarding mechanism -- save your program from crashing
- HashSet add
- 【CVPR2022】On the Integration of Self-Attention and Convolution
- MySQL 默认隔离级别是RR,为什么阿里等大厂会改成RC?
- 多御安全浏览器将改进安全模式,让用户浏览更安全
- How about ink cloud?
- HDU 1530 maximum clique
猜你喜欢

HashSet add

After ruoyi generates the code corresponding to the database, what should I do to make the following image look like

多御安全浏览器将改进安全模式,让用户浏览更安全

【CVPR2022】Lite Vision Transformer with Enhanced Self-Attention

CPU and memory usage are too high. How to modify RTSP round robin detection parameters to reduce server consumption?

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

Check box error

FreeRTOS个人笔记-任务通知

测试开发---自动化测试中的UI测试

Flink mind map
随机推荐
Configuration experiment of building virtual private network based on MPLS
Test Development - UI testing in automated testing
分享几种管理C程序中标志位的方法
【内功心法】——函数栈帧的创建和销毁(C实现)
面试了一位38岁程序员,听说要加班就拒绝了
Reading sdwebimage source code Notes
I interviewed a 38 year old programmer and refused to work overtime
接口幂等性问题
Clickhouse pit filling note 2: the join condition does not support non equal judgments such as greater than and less than
Google browser cannot open localhost:3000. If you open localhost, you will jump to the test address
Dcgan:deep volume general adaptive networks -- paper analysis
JSON in JS (launch object deep copy)
HDU 3666 the matrix problemdifferential constraint + stack optimization SPFA negative ring
Performance test classification
多御安全浏览器将改进安全模式,让用户浏览更安全
Printf function of input and output function in C language
Eccv2022 | 29 papers of Tencent Youtu were selected, including face security, image segmentation, target detection and other research directions
POJ 3417 network (lca+ differential on tree)
regular expression
Mysql基本查询