简体   繁体   English

java.sql.SQLException:未知的系统变量'transaction_isolation'

[英]java.sql.SQLException: Unknown system variable 'transaction_isolation'

I manually changed the version of mysql from 5.6.51 to 8.0.28, Then I used my java program to connect mysql and got the following error我手动把mysql的版本从5.6.51改成8.0.28,然后用我的java程序连接mysql出现如下错误

java.sql.SQLException: Unknown system variable 'transaction_isolation'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:829)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:449)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:242)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)

Below is my mysql Connector/J version下面是我的 mysql Connector/J 版本

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.28</version>
</dependency>

I may have found the reason, the reason is that I only modified the version number on the surface, but in fact java calls 'transaction_isolation' of mysql v8 according to the version information, and my mysql is actually only v5, missing 'transaction_isolation'我可能已经找到原因了,原因是我表面上只修改了版本号,但实际上java根据版本信息调用了mysql v8的'transaction_isolation',而我的mysql实际上只有v5,缺少'transaction_isolation'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.sql.SQLException: 未知的系统变量 &#39;tx_isolation&#39; - java.sql.SQLException: Unknown system variable 'tx_isolation' java.sql.SQLException:未知的系统变量“ OPTION” - java.sql.SQLException: Unknown system variable 'OPTION' java.sql.SQLException: 未知的系统变量 &#39;query_cache_size&#39; - java.sql.SQLException: Unknown system variable 'query_cache_size' java.sql.SQLException:尽管具有最新的 JDBC,但系统变量“query_cache_size”未知 - java.sql.SQLException: Unknown system variable 'query_cache_size' despite having latest JDBC java.sql.SQLException:您不能在托管事务期间提交 - java.sql.SQLException: You cannot commit during a managed transaction 如何解决java.sql.SQLException等待锁定的分布式事务 - How to resolve java.sql.SQLException distributed transaction waiting for lock java.sql.SQLException: 月 - java.sql.SQLException: MONTH java.sql.SQLException:没有这样的列 - java.sql.SQLException: no such column java.sql.SQLException:无法在全局事务中使用本地事务提交 - java.sql.SQLException: could not use local transaction commit in a global transaction java.sql.SQLException:超出了锁定等待超时; 尝试重新启动事务异常在MYSQL中发生 - java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction exception occur in MYSQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM