6對比5的主要區別是驅動和地區mysql
1.JDBC鏈接Mysql5:sql
driverClassName=com.mysql.jdbc.Driverurl
url=jdbc:mysql://localhost:3306/xingyu4j?&useUnicode=true&characterEncoding=UTF-8&useSSL=falsespa
username=rootcode
password=server
2.JDBC鏈接Mysql6:ip
driverClassName=com.mysql.cj.jdbc.Driverio
url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8&useSSL=falsetest
username=rootcoding
password=
3.JDBC鏈接Mysql8:
driverClassName=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&zeroDateTimeBehavior=CONVERT_TO_NULL&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username=root
password=
4.MySQL鏈接慢
編輯/etc/mysql/my.cnf (不一樣安裝方式版本位置不一樣,具體位置 find / -name my.cnf 查詢)
在[mysqld]下面加入
skip-name-resolve
保存後重啓mysql