当前位置:网站首页>The difference between Mysql application log time and system time is eight hours
The difference between Mysql application log time and system time is eight hours
2022-08-04 09:40:00 【slyybw】
The difference between the Mysql application log time and the system time is eight hours
I take the mysql slow query log as an example. By viewing the slow query log, I found that the difference between the log time and the server system time is eight hours
reason
The system default log_timestamps is UTC, Coordinated Universal Time, also known as Universal Universal Time, Universal Standard Time, and International Coordinated Time.Due to the different abbreviations in English (CUT) and French (TUC), as a compromise, the abbreviation is UTC.8 hours difference from linux system time (local time)
Solution
Workaround
mysql> SHOW VARIABLES LIKE 'log_timestamps';+----------------+------------+| Variable_name | Value |+----------------+------------+| log_timestamps | SYSTEM |+----------------+------------+1 row in set (0.00 sec)mysql> SET GLOBAL log_timestamps = SYSTEM; (effective immediately, restart the mysql service, invalid)Query OK, 0 rows affected (0.00 sec)
Permanently resolved
Add the following line to /etc/my.cnf:
log_timestamps=systemRestart the service to take effect.
边栏推荐
- 【正点原子STM32连载】第二章 STM32简介 摘自【正点原子】MiniPro STM32H750 开发指南_V1.1
- How Oracle for current library or certain library data on the same server number?
- 多媒体和物联网技术让版本“活”起来 129张黑胶唱片“百年留声”
- TiFlash 源码阅读(五) DeltaTree 存储引擎设计及实现分析 - Part 2
- 【C补充】指针相关知识点收集01
- 罗克韦尔AB PLC RSLogix5000中定时器指令使用方法介绍
- IDEA 自动导入的配置(Auto import)
- leetcode动态规划系列(求路径篇)
- 架构设计杂谈
- redis解决分布式session问题
猜你喜欢
随机推荐
Apache APISIX 2.15 版本发布,为插件增加更多灵活性
Post-94 Byte P7 posted the salary slip: It's really good to make up for this...
IDEA启动热部署
NAT/NAPT地址转换(内外网通信)技术详解【华为eNSP】
今年37了,被大厂抢着要...
ZbxTable 2.0 重磅发布!6大主要优化功能!
关于DSP驱动外挂flash
LeetCode中等题之设计循环队列
双指针方法
VRRP+MSTP配置详解【华为eNSP实验】
思想茶叶蛋 (Jul 31,2022)| 元宇宙(Metaverse)下了一枚什么样的蛋
一道[CSCCTF 2019 Qual]FlaskLight的详解再遇SSTI
I am 37 this year, and I was rushed by a big factory to...
2022年化工自动化控制仪表考试模拟100题及模拟考试
暴力破解-破解 Apache BASIC 认证
Cloud function to achieve automatic website check-in configuration details [Web function/Nodejs/cookie]
命里有时终须有--记与TiDB的一次次擦肩而过
字符串与正则表达式(C#)
cannot import name 'import_string' from 'werkzeug' [bug solution]
Win11文件资源管理器找不到选项卡怎么办?