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

前端 未结 3 837
时光取名叫无心
时光取名叫无心 2020-12-19 05:02

I am using play framework and I want to connect db, but I can\'t because I am getting following error:

play.api.Configuration$$anon$1: Configuration error[Ca         


        
相关标签:
3条回答
  • 2020-12-19 05:38

    If you are using MYSQL8, try to show variables like 'transaction_isolation'. Mysql8 has renamed tx_isolation to transaction_isolation.

    0 讨论(0)
  • 2020-12-19 05:40

    I was also getting the same error (when I am using the mysql6 database in mysql5 it was working fine) then I changed my connector jar from mysql-connector-java-5.1.46.jar to mysql.jar then the problem gone.

    0 讨论(0)
  • 2020-12-19 05:41

    I had a same problem. I upgraded my MySql Connector and solved my issue. try to use version 8 , like this:

    <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>8.0.13</version>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题