当前位置:网站首页>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.
边栏推荐
- leetcode经典例题——56.合并区间
- MindSpore:【mindinsight】【Profiler】用execution_time推导出来的训练耗时远小于真实的耗时
- Win7C盘不能扩大怎么办?Win7C盘扩展卷不能点怎么解决
- Detailed explanation of telnet remote login aaa mode [Huawei eNSP]
- Interview at 14:00 in the afternoon, I came out at 14:08 with my head down, asking too much...
- 去掉js代码文件所有注释
- 张朝阳对话俞敏洪:谈宇宙、谈焦虑、谈创业、谈退休、谈人生
- LeetCode 54. 螺旋矩阵 蛇形矩阵式输出字符串
- 各位大佬,请问mysql数据的cdc,能指定存量数据同步的zone为utc 吗
- ansible部署脚本--亲测可用无坑
猜你喜欢
MindSpore:【model_zoo】【resnet】尝试用THOR优化器运行时报cannot import name ‘THOR‘
94后字节P7晒出工资单:狠补了这个,真不错...
多媒体和物联网技术让版本“活”起来 129张黑胶唱片“百年留声”
leetcode动态规划经典例题——53.最大子数组和
Detailed explanation of MSTP protocol configuration on Layer 3 switches [Huawei eNSP experiment]
架构设计杂谈
【COS 加码福利】COS 用户实践有奖征文,等你来投稿!
Techwiz OLED:OLED器件的发光效率
KubeDNS 和 CoreDNS
MindSpore:【mindinsight】【Profiler】用execution_time推导出来的训练耗时远小于真实的耗时
随机推荐
KubeDNS 和 CoreDNS
MindSpore:mirrorpad算子速度过慢的问题
被Win11安全中心误删除的文件怎么恢复?
LeetCode中等题之旋转图像
[Punctuality Atom STM32 Serial] Chapter 4 STM32 First Experience Excerpted from [Punctual Atom] MiniPro STM32H750 Development Guide_V1.1
leetcode二叉树系列(二)
Libtomcrypt AES 加密及解密
Shell编程的条件语句
Layer 3 Switch/Router OSPF Configuration Details [Huawei eNSP Experiment]
leetcode经典例题——56.合并区间
冰蝎工具开发实现动态二进制加密WebShell
Detailed explanation of NAT/NAPT address translation (internal and external network communication) technology [Huawei eNSP]
telnet远程登录aaa模式详解【华为eNSP】
参数优化文档介绍
TiCDC同步延迟问题处理
三层交换机/路由器OSPF配置详解【华为eNSP实验】
Post-94 Byte P7 posted the salary slip: It's really good to make up for this...
Detailed explanation of telnet remote login aaa mode [Huawei eNSP]
leetcode动态规划经典例题——53.最大子数组和
【无标题】