Spring 连接MySQL报错java.sql.SQLException: Unknown system variable 'tx_isolation'

先是报错255,这个时候需要把

jdbc:mysql://localhost:3306/projUse    写成   jdbc:mysql://localhost:3306/projUse?useUnicode=true&characterEncoding=utf8

后来报错

java.sql.SQLException: Unknown system variable 'tx_isolation'

解决办法:

在pom.xml文件中将MySQL Connector / J版本升级为8:

<!-- MySQL Connector  -->
<dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.11</version>

</dependency>

上一篇:NC57访问报错:java.sql.SQLException: Io 异常: Got minus one from a read call


下一篇:Codeforces Round #381 (Div. 2)A. Alyona and copybooks(dfs)