In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today found that there is a program inserted at the wrong time, and this field is the default value of the configuration CURRENT_TIMESTAMP, preliminary judgment is the database time zone setting problem.
View time zone
Log in to the database to view the time zone configuration:
Mysql > show variables like'% time_zone%' +-+-+ | Variable_name | Value | +-+-+ | system_time_zone | EDT | | time_zone | SYSTEM | +-+-+ 2 rows in set (0.00 sec) system_time_zone table The time zone used by the system is EDT, the Eastern Daylight time of North America (- 4h). Time_zone indicates that MySQL uses the system's time zone. That is, if the time zone information is not set at the time of connection, this time zone configuration will be adopted.
Modify time zone
The method to modify the time zone is as follows:
# only modify the time zone of the current session, stop the session invalidation set time_zone ='+ 8privileges 0000timezone configuration # modify the global time zone configuration set global time_zone ='+ 8purpose00time zone flush configuration
Of course, the configuration can also be achieved by modifying the configuration file (my.cnf), but the service needs to be restarted.
# vim / etc/my.cnf # # add default-time_zone ='+ 8 etc/init.d/mysqld restart # # to the [mysqld] area to restart mysql to make the new time zone effective
In other words, unlike China, the United States has four time zones.
Summary
The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support.
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: 288
*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.