sharding_proxy: Caused by: java.sql.SQLException: Unknown system variable 'query_cache_size'
Bug Report
use sharding-proxy-3.1.0 connect to mysql 5.7 with config config-sharding.yaml。 sharding-proxy-3.1.0 ‘s error log:
Caused by: java.sql.SQLException: Unknown system variable 'query_cache_size'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2444)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1381)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3766)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3229)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2238)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2024)
at com.mysql.jdbc.ConnectionImpl.
what is version of your jdbc driver? upgrade your jdbc driver and try it again
what is version of your jdbc driver? upgrade your jdbc driver and try it again
I have updated my jdbc drvier to mysql-connector-java-8.0.15 on the host of sharding_proxy, mysql server is on the other server。 but it still hava the error of Caused by: java.sql.SQLException: Unknown system variable 'query_cache_size'。
warning: mysql-connector-java-8.0.15-1.el7.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY package mysql-connector-java-8.0.15-1.el7.noarch is already installed
Hi @msnetc, I'm sorry, could you please describe as detailed as you can? Before your respond. Let me guess what the problem is. You JDBC(cliend)'s version is too low to match MySQL server 5.7.
BTW, why and how you update JDBC on sharding-proxy host?
@tuohai666 ,maybe I use the wrong version of config file, so I close the config.
Here is a blog http://www.tusacentral.net/joomla/index.php/mysql-blogs/198-proxysql-server-version-impersonation.html It explains why the issue happens