简体   繁体   English

Maxscale 不允许连接 mysql8 与 java 应用程序

[英]Maxscale not allowed to connect mysql8 with java application

I have a mysql 8.0.3 database over top of that maxscale server is running when i tried to connect with that mysql jdbc driver this error is coming unknown system variable 'query_cache_size' .当我尝试连接 mysql jdbc 驱动程序时,我有一个mysql 8.0.3数据库在该maxscale 服务器上运行,此错误来自未知系统变量 But when i tried to connect directly to database is working for me.但是当我尝试直接连接到数据库时对我有用。 query_cache_size parameters removed from mysql 8.从 mysql 8 中删除了 query_cache_size 参数。

The query cache has been deprecated.查询缓存已被弃用。 BTW 8.0.3 is a very old version (4 years) and was pre-general availability (a release candidate) so please do not use it for production. BTW 8.0.3 是一个非常旧的版本(4 年)并且是预通用版本(一个发布候选版本),所以请不要将它用于生产。

This is most likely caused by the following bug: https://jira.mariadb.org/browse/MXS-2890这很可能是由以下错误引起的: https://jira.mariadb.org/browse/MXS-2890

The MariaDB JDBC connector should not suffer from this problem which means installing it instead of the MySQL JDBC connector can be used as a workaround. The MariaDB JDBC connector should not suffer from this problem which means installing it instead of the MySQL JDBC connector can be used as a workaround.

In your /etc/maxscale.cnf you can add version_string=5.6在您的 /etc/maxscale.cnf 中,您可以添加 version_string=5.6

[Read-Write-Service]
type=service
router=readwritesplit
servers=master
version_string=5.6
user=user
password=********```

after that i am  able to access mysql8 on top of maxscale server.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM