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--
When programmatically accessing the Mysql database, the time zone error is reported as follows:
The server time zone value 'boys' is unrecognized or represents more than one time zone
There are usually two solutions:
First, add? serverTimezone=UTC, the default 0 time zone, after the database connection statement, but note that the statement needs to be followed in the first position of the database connection statement, otherwise an error will be reported, for example:
Jdbc.url=jdbc:mysql://localhost:3306/testdatabase?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
However, there is a problem that when the time field is inserted into the database, the time is 8 hours earlier than the current time, that is, the current system time minus 8 hours.
Second, change the time zone of Mysql to East Zone 8, and execute the following command:
Set global time_zone='+8:00'
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.