You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/04/11 10:57:44 UTC
[GitHub] [shardingsphere] lwclover opened a new issue, #16735: Shardingsphere-proxy fails to establish a connection when it proxies multiple versions of mysql databases
lwclover opened a new issue, #16735:
URL: https://github.com/apache/shardingsphere/issues/16735
Shardingsphere proxy version 5.0.0.
Shardingsphere-proxy proxies 2 mysql servers, mysql 5.6 and 5.7.
The mysql driver version used by the application is 8.0.13,Now select version() result is 5.7.34-log-ShardingSphere-Proxy 5.
The application fails to establish a connection, Exception is:
```
java.sql.SQLException: Could not map transaction isolation '1' to a valid JDBC level.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
at com.mysql.cj.jdbc.ConnectionImpl.getTransactionIsolation(ConnectionImpl.java:1229)
at com.zaxxer.hikari.pool.PoolBase.checkDefaultIsolation(PoolBase.java:479)
at com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:442)
at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:410)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:363)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
at com.lixiang.proxy.test.ProxyJDBCTest.main(ProxyJDBCTest.java:28)
```
The reason is that mysql needs to query the isolation level of the database before establishing a connection,
Mysql5.6 does not support transaction_isolation syntax。
[`transaction_isolation was added in MySQL 5.7.20 as an alias for tx_isolation, which is now deprecated and is removed in MySQL 8.0. Applications should be adjusted to use transaction_isolation in preference to tx_isolation.`](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_tx_isolation)
I think the correct way is to return the corresponding mysql version。
I'm fixing this problem and need a little help。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #16735: Shardingsphere-proxy fails to establish a connection when it proxies multiple versions of mysql databases
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #16735: Shardingsphere-proxy fails to establish a connection when it proxies multiple versions of mysql databases
URL: https://github.com/apache/shardingsphere/issues/16735
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #16735: Shardingsphere-proxy fails to establish a connection when it proxies multiple versions of mysql databases
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #16735:
URL: https://github.com/apache/shardingsphere/issues/16735#issuecomment-1094939599
Is there any error logs in ShardingSphere-Proxy?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] lwclover commented on issue #16735: Shardingsphere-proxy fails to establish a connection when it proxies multiple versions of mysql databases
Posted by GitBox <gi...@apache.org>.
lwclover commented on issue #16735:
URL: https://github.com/apache/shardingsphere/issues/16735#issuecomment-1095759241
>
There is no error in ShardingSphere-Proxy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org