jar package Download: https://dev.mysql.com/downloads/connector/j/
Jar package version to be consistent with the version of the database
Using 5.x versions:
url = "jdbc:mysql://localhost:3306/database_name"
驱动: com.mysql.jdbc.Driver
When using version 8.x, you want to add some parameters:
url = "jdbc:mysql://localhost:3306/database_name? characterEncoding=utf8 & useSSL=false & serverTimezone=UTC & rewriteBatchedStatements=true";
驱动:
com.mysql.cj.jdbc.Driver