Bug #114288 JDBC driver issue with query_cache_size
Submitted: 8 Mar 2024 21:43 Modified: 9 Mar 2024 14:45
Reporter: Dragos Pruteanu Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:8.3.0 OS:Any
Assigned to: CPU Architecture:Any

[8 Mar 2024 21:43] Dragos Pruteanu
Description:
Trying to connect to a MySQL 8.0.22 database using JDBC 8.3.0 causes:

java.sql.SQLException: Unknown system variable 'query_cache_size'
  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)
  at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
  at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:815)
  at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:438)
  at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
  at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:189)

How to repeat:
connect to MySQL 8.0.22
[9 Mar 2024 14:45] MySQL Verification Team
Hi,

See:
 https://dev.mysql.com/doc/connector-j/en/connector-j-versions.html
 https://dev.mysql.com/blog-archive/mysql-8-0-retiring-support-for-the-query-cache/

There is no query cache in 8.0. Suggest you check the server version.