Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxysql 2.7.1 with MySQL 8.0 Integration Error: "Unknown system variable 'query_cache_size'" #4772

Open
colozhan opened this issue Dec 16, 2024 · 1 comment

Comments

@colozhan
Copy link

System Environment:

Operating System: RockyLinux 9
MySQL Version: 8.0
Proxysql Version: 2.7.1-1-centos9.x86_64.rpm
Installation Method: Installed via RPM package
Issue Description:
When integrating Proxysql 2.7.1 with MySQL 8.0, the service starts without any errors. However, when the application connects to MySQL through Proxysql, the following error is thrown:
Unknown system variable 'query_cache_size'
There is no error when the application directly connects to MySQL 8.0 without Proxysql.

Steps to Reproduce:

Install Proxysql 2.7.1 and MySQL 8.0 on a RockyLinux 9 system.
Configure Proxysql as a proxy for MySQL.
Start the Proxysql service.
Attempt to connect to MySQL via the application through Proxysql, and the error "Unknown system variable 'query_cache_size'" occurs.
Directly connect to the MySQL 8.0 database, no errors.
Expected Result:
I would like to resolve the compatibility issue between Proxysql and MySQL 8.0, and avoid the "Unknown system variable 'query_cache_size'" error.

Solutions Already Attempted:

Checked Proxysql configuration files to ensure query_cache is not explicitly enabled.
Verified that the MySQL configuration has the query_cache-related options disabled.
Ensured compatibility of Proxysql version with MySQL 8.0.
Additional Information:

MySQL 8.0 has disabled the query_cache_size by default, but Proxysql seems to still attempt to load this parameter when processing queries. Assistance in resolving this compatibility issue would be appreciated.

@renecannao
Copy link
Contributor

Attempt to connect to MySQL via the application through Proxysql, and the error "Unknown system variable 'query_cache_size'" occurs.

You mean that your application is querying query_cache_size. Most probably, you are using JDBC , that is assuming that query cache is enabled because of MySQL version advertised.

Configure mysql-server_version accordingly.
If you are using a mix of backends of different version, create a query rules that replace querying query_cache_size with a zero.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants