java mysql連接時出現的問題
阿新 • • 發佈:2019-03-07
rally utf iso mysql 需要 數據庫 tomat automatic ria
當出現Caused by: java.sql.SQLException: Unknown system variable ‘tx_isolation’
一般是mysql-connector-java的版本太低,數據庫的版本太高
之前我用的5.7的數據庫,後來換電腦了 裝了8.0的數據庫,然後mysql-connector-java
之後換把mysql-connector-java的版本調高了
需要註意的是
中間又出了這樣的錯誤
Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver‘. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
需要把com.mysql.jdbc.Driver換成com.mysql.cj.jdbc.Driver
jdbc:mysql://localhost:3306/addict?characterEncoding=utf-8&serverTimezone=GMT
java mysql連接時出現的問題