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
If you using MySql v8.0 then you should try fix this bug with
mysql-connector-java-5.1.9
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.
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!!!!
just change the version of mysql use this in pom.xml
<version>8.0.11</version>