[MXS-2890] 5.5.5 prefix is always added even with version_string=8.0.16 Created: 2020-02-13 Updated: 2023-11-16 Resolved: 2021-07-14 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Core |
| Affects Version/s: | 2.4.6 |
| Fix Version/s: | 2.5.14 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Judy Yu | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
mysql 8.0.16 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
The mysql-connector-java doesn't know to remove the 5.5.5- prefix sent by MariaDB and it thinks it's using an older MySQL version. To support connectors which do not understand the 5.5.5- prefix, an option to not automatically generate it would be needed. Original title: cannot connect db through maxscale using mysql-connector-java I could connect DB using mysql-connector-java, and could connect DB through maxscale using mysql cli. I catch the packet between client mysql-connector-java and maxscale shows as attachment. 10.197.0.34 is client and 10.197.49.34 is maxscale. The packet no 8 shows it use 8.0.16 mysql-connector-java but also ask query_cache_size info. |
| Comments |
| Comment by markus makela [ 2020-02-13 ] | |
|
Does the connector use that based on the version of the server it uses? If so, you could try to manually set version_string in the MaxScale service. | |
| Comment by Judy Yu [ 2020-02-14 ] | |
|
I set version_string=8.0.16 which is mysql version. Then try again and the exception throws either. And the log says as below. Do you have any suggestions? 2020-02-14 11:54:11.996 info : (6) [readwritesplit] (log_server_connections): Servers and router connection counts: | |
| Comment by Judy Yu [ 2020-02-17 ] | |
|
Hi markus, today I try to connect to mysql-8.0.16 through maxscale and direct connect, then catch the packet and compare. The packet added also. And I set version_string=8.0.16 in service partion. | |
| Comment by markus makela [ 2020-07-03 ] | |
|
This is expected behavior of MaxScale: it'll add a 5.5.5- prefix if the version string doesn't start with one (this is expected by multiple connectors). This might be a problem in the connector if it doesn't know to remove the 5.5.5- prefix and use the actual version after it. Have you tried if the MariaDB JDBC connector behaves the same way? The problem with behaving as if MaxScale was a 8.0 server means that it must also support caching_sha2_password which cannot be supported by MaxScale. | |
| Comment by markus makela [ 2020-10-12 ] | |
|
yuyuyu1618 have you been able to test whether the MariaDB JDBC connector works for you? | |
| Comment by Nguyen Tan Vy [ 2020-12-31 ] | |
|
I am facing the same issue.
2/ Run MySQL 8.0.20 behind Maxscale 2.4 + Maxscale 2.5. My service use mysql-connector-java 8.0.16 for connect to Maxscale 2.4 & 2.5:
| |
| Comment by markus makela [ 2021-07-14 ] | |
|
Fixed by pull request 230. |