MySQL 8.0以上数据库驱动遇到的坑

2022-08-09 12:35:34

MySQL 8.0配置对应驱动包匹配注意点:

  • 之前配置数据库驱动连接信息
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
jdbc.username=root
jdbc.password=1234
  • 8.0以后
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
jdbc.username=root
jdbc.password=1234

其中
driver :com.mysql.cj.jdbc.Driver

url 参数部分:useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
做了改变

  • 作者:ArvinWoo
  • 原文链接:https://blog.csdn.net/qq_37595946/article/details/94361621
    更新时间:2022-08-09 12:35:34