Unknown system variable 'tx_isolation'] with root cause
生活随笔
收集整理的這篇文章主要介紹了
Unknown system variable 'tx_isolation'] with root cause
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
場景
Spring Boot項(xiàng)目啟動(dòng)后運(yùn)行提示:
詳細(xì)如下:
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Unknown system variable 'tx_isolation'] with root causejava.sql.SQLException: Unknown system variable 'tx_isolation'at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383) ~[mysql-connector-java-5.1.6.jar:na]at com.mysql.jdbc.ConnectionImpl.getTransactionIsolation(ConnectionImpl.java:3117) ~[mysql-connector-java-5.1.6.jar:na]at com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:466) ~[HikariCP-3.2.0.jar:na]at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:421) ~[HikariCP-3.2.0.jar:na]at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:374) ~[HikariCP-3.2.0.jar:na]at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198) ~[HikariCP-3.2.0.jar:na]at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467) ~[HikariCP-3.2.0.jar:na]at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541) ~[HikariCP-3.2.0.jar:na]at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-3.2.0.jar:na]at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~解決
找到pom.xml中mysql驅(qū)動(dòng)的版本,升級即可。這里是5.1.6將其版本改高點(diǎn)即可。
總結(jié)
以上是生活随笔為你收集整理的Unknown system variable 'tx_isolation'] with root cause的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SpringBoot中使用thymele
- 下一篇: Unknown initial char