当前位置:网站首页>Common errors when mysql8 connects through JDBC
Common errors when mysql8 connects through JDBC
2022-06-12 02:22:00 【Procedural ape (siege lion)】
1. mysql8 perform jdbc Connect to the times The server time zone value '' is unrecognized ...
Error as title , The above cannot identify the time zone settings or multiple time zones .
terms of settlement , It can be in jdbc url Add time zone settings in , Another way is to mysql Set time zone .
mysql> set global time_zone='+8:00';
Query OK, 0 rows affectedAfter setting , The report goes wrong .
2. mysql8 perform jdbc Connect to the times java.math.BigInteger cannot be cast to java.lang.Long
The reason is that mysql 5.1.27 Drive connection for mysql 8, Modified to 8.0.11.
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>3. mysql8 When no global time zone is specified , You need to connect to the database url You need to specify
jdbc:mysql://localhost:3306/demo?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=GMT%2b8The parameters are serverTimezone=GMT%2b8 That is, specify the time zone as GMT+8.
边栏推荐
- Is there a female Bluetooth headset suitable for girls? 38 Bluetooth headsets worth getting started
- Summary of force deduction method 417- Pacific Atlantic current problems
- 程序员应该如何解决买菜难问题?手把手带你利用无障碍辅助功能快速下单抢菜
- Force deduction solution summary 1728- cat and mouse II
- Summary of force deduction solution 436- finding the right interval
- 打包一个包含手表端应用的手机端APK应用—Ticwear
- Force deduction solution summary 824 goat Latin
- SwiftyJSON解析本地JSON文件
- 力扣解法汇总388-文件的最长绝对路径
- Package a mobile APK app containing watch app - ticwear
猜你喜欢

MySQL advanced knowledge points

RPA introduction

Graphic data analysis | data cleaning and pretreatment

Knowledge points of mall development

Is there a female Bluetooth headset suitable for girls? 38 Bluetooth headsets worth getting started

一起教育科技单季营收2.3亿:同比降51% 净亏大幅收窄

Graphical data analysis | data analysis tool map

MySQL table common operation mind map

The release of star ring kundb 2.2 provides a new choice for business systems with high concurrent transactions and queries

程序员应该如何解决买菜难问题?手把手带你利用无障碍辅助功能快速下单抢菜
随机推荐
ozzanimation-基于sse的动作系统
String number with special style
博创智能冲刺科创板:年营收11亿 应收账款账面价值3亿
Swiftyjson parsing local JSON files
How to make div 100% page (not screen) height- How to make a div 100% of page (not screen) height?
SwiftyJSON解析本地JSON文件
ACL2022 | DCSR:一种面向开放域段落检索的句子感知的对比学习方法
Does the virtual host have independent IP
2022最全面的Redis事务控制(带图讲解)
Force deduction solution summary 450- delete nodes in the binary search tree
力扣解法汇总面试题 01.05. 一次编辑
Force deduction solution summary 732- my schedule III
Force deduction solution summary - Sword finger offer II 114 Alien dictionary
[no title] 2022 coal mine safety inspection test questions and online simulation test
力扣解法汇总1022-从根到叶的二进制数之和
Force deduction solution summary 699- dropped blocks
Don't miss it! Five large data visualization screens that HR must collect
Force deduction solution summary 933- number of recent requests
Force deduction solution summary 398 random number index
SQL calculates KS, AUC, IV, psi and other risk control model indicators