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

后端 未结 10 874
再見小時候
再見小時候 2020-12-06 04:28

I have a app running with JDBC and get data from MySQL, but I can\'t build it because of this error :

java.sql.SQLException: Unknown system variable \'query         


        
相关标签:
10条回答
  • 2020-12-06 05:02

    If you using MySql v8.0 then you should try fix this bug with

    mysql-connector-java-5.1.9

    0 讨论(0)
  • 2020-12-06 05:04

    Try using MySQL 8.0.3 As can be seen on the docs, the query_cache_size was removed on MySQL8. JetBrains guys have suffered the same issue, is seems to be that it is fixed by updating the driver to the version MySQL JDBC driver v 5.1.44.

    0 讨论(0)
  • 2020-12-06 05:06

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

    In pom file of your project, just update the version of the dependency.

    For example it's 6.0.2 of mysql java connector just update it to latest one like 8.0.11

    It works!!!!

    0 讨论(0)
  • 2020-12-06 05:08

    just change the version of mysql use this in pom.xml

    <version>8.0.11</version>
    
    0 讨论(0)
提交回复
热议问题