ProxySQL query_cache_size issue with MySQL 8.0.3+ in backend

If one try to connect to ProxySQL via JDBC 8.0.X he gets error

com.mysql.cj.exceptions.CJException: Unknown system variable ‘query_cache_size’

MySQL Connector/J source code shows


if (!versionMeetsMinimum(8, 0, 3)) {
queryBuf.append(", @@query_cache_size AS query_cache_size");
queryBuf.append(", @@query_cache_type AS query_cache_type");
}

and ProxySQL are treated as MySQL 5.5.30

proxy

So for now a workaround is:

update global_variables set variable_value="8.0.4 (ProxySQL)" where variable_name='mysql-server_version';
load mysql variables to run;save mysql variables to disk;

ProxySQL GitHub threads:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s