mazhai opened a new issue #11481:
URL: https://github.com/apache/shardingsphere/issues/11481
### Which version of ShardingSphere did you use?
4.0.0-RC1
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
sharding-proxy
### Expected behavior
I hope Navicat can connect sharding-proxy
### Actual behavior
Navicat connection failed ,report No database selected
### Reason analyze (If you can)
Dbeaver can connect, but Navicat can't. I think it's a code problem
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
[INFO ] 17:24:17.483 [nioEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0xcd0eea40, L:/0:0:0:0:0:0:0:0:3307]
READ: [id: 0x3dded63d, L:/127.0.0.1:3307 - R:/127.0.0.1:53670]
[INFO ] 17:24:17.486 [nioEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0xcd0eea40, L:/0:0:0:0:0:0:0:0:3307]
READ COMPLETE
[INFO ] 17:24:17.498 [ShardingSphere-Command-14] ShardingSphere-SQL - Rule
Type: sharding
[INFO ] 17:24:17.498 [ShardingSphere-Command-14] ShardingSphere-SQL - Logic
SQL: SET NAMES utf8mb4
[INFO ] 17:24:17.498 [ShardingSphere-Command-14] ShardingSphere-SQL -
SQLStatement: DALStatement(super=AbstractSQLStatement(type=DAL,
tables=Tables(tables=[]),
routeConditions=Conditions(orCondition=OrCondition(andConditions=[])),
encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])),
sqlTokens=[], parametersIndex=0, logicSQL=null))
[INFO ] 17:24:17.498 [ShardingSphere-Command-14] ShardingSphere-SQL - Actual
SQL: ds_0 ::: SET NAMES utf8mb4
[INFO ] 17:24:21.656 [ShardingSphere-Command-15] ShardingSphere-SQL - Rule
Type: sharding
[INFO ] 17:24:21.656 [ShardingSphere-Command-15] ShardingSphere-SQL - Logic
SQL: SHOW VARIABLES LIKE 'lower_case_%'; SHOW VARIABLES LIKE 'sql_mode'; SELECT
COUNT(*) AS support_ndb FROM information_schema.ENGINES WHERE Engine =
'ndbcluster'
[INFO ] 17:24:21.656 [ShardingSphere-Command-15] ShardingSphere-SQL -
SQLStatement: DALStatement(super=AbstractSQLStatement(type=DAL,
tables=Tables(tables=[]),
routeConditions=Conditions(orCondition=OrCondition(andConditions=[])),
encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])),
sqlTokens=[], parametersIndex=0, logicSQL=null))
[INFO ] 17:24:21.656 [ShardingSphere-Command-15] ShardingSphere-SQL - Actual
SQL: ds_0 ::: SHOW VARIABLES LIKE 'lower_case_%'; SHOW VARIABLES LIKE
'sql_mode'; SELECT COUNT(*) AS support_ndb FROM information_schema.ENGINES
WHERE Engine = 'ndbcluster'
[INFO ] 17:24:22.773 [ShardingSphere-Command-0] ShardingSphere-SQL - Rule
Type: sharding
[INFO ] 17:24:22.774 [ShardingSphere-Command-0] ShardingSphere-SQL - Logic
SQL: SHOW VARIABLES LIKE 'lower_case_%'
[INFO ] 17:24:22.774 [ShardingSphere-Command-0] ShardingSphere-SQL -
SQLStatement: DALStatement(super=AbstractSQLStatement(type=DAL,
tables=Tables(tables=[]),
routeConditions=Conditions(orCondition=OrCondition(andConditions=[])),
encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])),
sqlTokens=[], parametersIndex=0, logicSQL=null))
[INFO ] 17:24:22.774 [ShardingSphere-Command-0] ShardingSphere-SQL - Actual
SQL: ds_0 ::: SHOW VARIABLES LIKE 'lower_case_%'
[INFO ] 17:24:23.911 [ShardingSphere-Command-1] ShardingSphere-SQL - Rule
Type: sharding
[INFO ] 17:24:23.911 [ShardingSphere-Command-1] ShardingSphere-SQL - Logic
SQL: SHOW VARIABLES LIKE 'sql_mode'
[INFO ] 17:24:23.911 [ShardingSphere-Command-1] ShardingSphere-SQL -
SQLStatement: DALStatement(super=AbstractSQLStatement(type=DAL,
tables=Tables(tables=[]),
routeConditions=Conditions(orCondition=OrCondition(andConditions=[])),
encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])),
sqlTokens=[], parametersIndex=0, logicSQL=null))
[INFO ] 17:24:23.911 [ShardingSphere-Command-1] ShardingSphere-SQL - Actual
SQL: ds_0 ::: SHOW VARIABLES LIKE 'sql_mode'
### Example codes for reproduce this issue (such as a github link).
config-sharding.yaml
schemaName: sharding_db
dataSources:
ds_0:
# 局域网
# url:
jdbc:mysql://***/***?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8
username: ***
password: ***
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
maintenanceIntervalMilliseconds: 30000
shardingRule:
tables:
service_attendance_detail:
actualDataNodes:
ds_0.service_attendance_detail_2021_0$->{1..9},ds_0.service_attendance_detail_2021_1$->{0..2}
tableStrategy:
inline:
shardingColumn: course_date
algorithmExpression:
service_attendance_detail_2021_$->{course_date[5..6]}
server.yaml
authentication:
username: root
password: root
#
props:
max.connections.size.per.query: 1
acceptor.size: 16 # The default value is available processors count * 2.
executor.size: 16 # Infinite by default.
# proxy.frontend.flush.threshold: 128 # The default value is 128.
# # LOCAL: Proxy will run with LOCAL transaction.
# # XA: Proxy will run with XA transaction.
# # BASE: Proxy will run with B.A.S.E transaction.
# proxy.transaction.type: LOCAL
# proxy.opentracing.enabled: false
sql.show: true
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]