In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Let me tell you a little bit about how to deal with the difference between mysql5.7 log time and system time. Have you known about similar topics before? If you are interested, let's take a look at this article. I believe it is helpful to read how to deal with the difference between mysql5.7 log time and system time.
The parameter log_timestamps is added in MySQL 5.7.2, which is mainly used to control the display time parameters of error log, genera log, and so on.
And the default post-installation error_log,slow_log log timestamp defaults to UTC, so it will be inconsistent with the system time, with a difference of 8 hours from Beijing time
Mysql > SHOW GLOBAL VARIABLES LIKE 'log_timestamps';+-+-+ | Variable_name | Value | +-+-+ | log_timestamps | UTC | +-+-+ 1 row in set (0.00 sec) mysql > set GLOBAL log_timestamps=SYSTEM Query OK, 0 rows affected (0.00 sec) mysql > SHOW GLOBAL VARIABLES LIKE 'log_timestamps';+-+-+ | Variable_name | Value | +-+ | log_timestamps | SYSTEM | +-+-+ 1 row in set (0.00 sec)
Because log_timestamps is a global parameter of GLOBAL, set the global parameter directly after login, and it will expire directly after restart.
Therefore, it is necessary to add a log_timestamps configuration to [mysqld] in the mysql configuration file / etc/my.cnf.
Log_timestamps=SYSTEM
How do you think the mysql5.7 log time is different from the system time? how to deal with this article, whether there is any gain. If you want to know more about it, you can continue to follow our industry information section.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.