当前位置:网站首页>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.
边栏推荐
猜你喜欢
Libtomcrypt AES 加密及解密
Win11如何隐藏输入法悬浮窗?
2022年化工自动化控制仪表考试模拟100题及模拟考试
去掉js代码文件所有注释
2022 Cloud Native Computing代表厂商 | 灵雀云第三次入选Gartner中国ICT技术成熟度曲线报告
如何快速将Zabbix5.0升级至6.0?
Detailed explanation of switch link aggregation [Huawei eNSP]
IDEA 自动导入的配置(Auto import)
什么是元宇宙?
【正点原子STM32连载】第三章 开发环境搭建 摘自【正点原子】MiniPro STM32H750 开发指南_V1.1
随机推荐
多媒体和物联网技术让版本“活”起来 129张黑胶唱片“百年留声”
LVGL's multi-language conversion tool -- a good assistant for font settings
有坦荡的远方
【正点原子STM32连载】第四章 STM32初体验 摘自【正点原子】MiniPro STM32H750 开发指南_V1.1
Apache APISIX 2.15 版本发布,为插件增加更多灵活性
Win11系统重装用什么好 一键重装Win11教程
并发编程之生产者和消费者问题
Detailed Explanation of Addresses Delivered by DHCP on Routing/Layer 3 Switches [Huawei eNSP]
获取cpu的核数
MindSpore:图算融合报错
[Punctuality Atom STM32 Serial] Chapter 3 Development Environment Construction Excerpted from [Punctual Atom] MiniPro STM32H750 Development Guide_V1.1
ZbxTable 2.0 重磅发布!6大主要优化功能!
外包干了四年,秋招终于上岸了
密码字典生成工具pydictor/john
leetcode二叉树系列(二)
TiCDC同步延迟问题处理
【正点原子STM32连载】第一章 本书学习方法 摘自【正点原子】MiniPro STM32H750 开发指南_V1.1
Post-94 Byte P7 posted the salary slip: It's really good to make up for this...
张朝阳对话俞敏洪:谈宇宙、谈焦虑、谈创业、谈退休、谈人生
请问同一个oracle cdc表,如果flink job重新提交,是会全量读取一遍源数据还是增量呢?