Connection Q:driver/datasource Class Name
A:
? Low version: Com.mysql.jdbc.Driver
? High version (5.7+): Com.mysql.cj.jdbc.Driver
?
Q:connection URL Syntax
A:
This is the generic format of the connection URL:
protocol//[hosts][/database][?properties]
For example:
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=GMT%2B8
Note: Use Tomcat to open a server (port 3306), database name test, properties using ' & ' delimited
?
?
Properties Q:using Character Sets and Unicode
A:
The character encoding between client and server is automatically detected upon connection. You must specify the encoding in server using the URL to connect database.
For example, the to user UTF-8 Chatacter sets with connector/j. You can using the "Characterencoding=utf8" to config your connector/j.
?
q:connecting securely Using SSL
A:
The Ssl:secure Socket Layer is designed to secure data transmission over the Internet, using data encryption (encryption) technology to ensure that it is not intercepted and tapped during transmission over the network.
For example:
useSSL=true or useSSL=false
?
Q: Using the JDBC driver for time zone-raised issues
A:
1. Lower MySQL version (below 5.6)
2. Add Servertimezone=utc or GMT, if you specify to use the gmt+8 time zone, you need to write as GMT%2B8, otherwise you may resolve to null.
MySQL Connector to J 8.0 q&a