标签:MySQL Connector/J JDBC
ConnectionA:
?低版本:com.mysql.jdbc.Driver
?高版本(5.7+):com.mysql.cj.jdbc.Driver
?
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
注:使用tomcat开设服务器(端口3306),数据库名test,属性使用‘&’分隔
?
?
A:
The character encoding between client and server is automatically detected upon connection. You must specify the encoding on server using the URL to connect database.
For example, to user UTF-8 chatacter sets with Connector/J. You can using "characterEncoding=utf8" to config your Connector/J.
?
A:
SSL:Secure Socket Layer,用以保障在Internet上数据传输之安全,利用数据加密(Encryption)技术,可确保数据在网络上之传输过程中不会被截取及窃听。
For example:
useSSL=true or useSSL=false
?
A:
1.降低MySQL版本(5.6以下)
2.增加serverTimezone=UTC或GMT,如果指定使用gmt+8时区,需要写为GMT%2B8,否则可能解析为空。
标签:MySQL Connector/J JDBC
原文地址:http://blog.51cto.com/13801495/2127946