In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the "JDBC connection database mysql serverTimezone useSSL error problem resolution", in the daily operation, I believe that many people have doubts in the JDBC connection database mysql serverTimezone useSSL error analysis problem, the editor consulted all kinds of information, sorted out a simple and easy-to-use operation method, hope to answer the "JDBC connection database mysql serverTimezone useSSL error problem analysis" doubt to help! Next, please follow the editor to study!
Mysql serverTimezone useSSL time difference between JDBC and database
DriverClass=com.mysql.cj.jdbc.Driver
JdbcUrl=jdbc:mysql://: 3306/aidu_app?useSSL=false&useUnicode=true&characterEncoding=UTF8&serverTimezone=Asia/Shanghai
The jar used to connect to MySQL8 is 8.0, so with serverTimezone, if the serverTimezone=GMT time is not correct
And in database query statements, the entity class will report an error because the field is in''single quotation marks for the keyword.
Java CST type time conversion, String string to date time type
String date = "Thu Aug 27 18:05:49 CST 2015"; SimpleDateFormat sdf = new SimpleDateFormat ("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); Date d = sdf.parse (date); String formatDate = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss") .format (d); System.out.println (formatDate)
If you make a mistake, check whether your date string format is correct ("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US)
If there is an extra space in the middle, it will also report an error.
At this point, the study on "JDBC connection database mysql serverTimezone useSSL error analysis" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.