jikegreen opened a new issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115


   ## Question
   
   I want to use Sharding Proxy in docker,and it report Connection refused in 
container ,but i use mysql-client in container  is ok
   
   my configuration below:
   ### server.yaml
   orchestration:
     o1:
      namespace: governance_ds
      orchestrationType: registry_center,config_center
      instanceType: zookeeper
      serverLists: 30.43.49.238:2181
      props:
        retryIntervalMilliseconds: 500
        timeToLiveSeconds: 60
        maxRetries: 3
        operationTimeoutMilliseconds: 500
   
   authentication:
    users:
      root:
        password: root
      sharding:
        password: sharding
        authorizedSchemas: sharding_db
   
   props:
    max-connections-size-per-query: 4
    acceptor-size: 16  # The default value is available processors count * 2.
    executor-size: 16  # Infinite by default.
    proxy-frontend-flush-threshold: 128  
    proxy-transaction-type: BASE
    proxy-opentracing-enabled: false
    proxy-hint-enabled: false
    query-with-cipher-column: true
    sql-show: true
    check-table-metadata-enabled: true
   
   ### config-sharding.yaml
   schemaName: sharding_db
   
   dataSource:
    username: root
    password:
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 50
    minPoolSize: 1
    maintenanceIntervalMilliseconds: 30000
   
   dataSources:
    ds_0:
      url: 
jdbc:mysql://30.43.49.238:3306/ds_0?useSSL=false&useUnicode=true&characterEncoding=UTF8&autoReconnect=true
    ds_1:
      url: 
jdbc:mysql://30.43.49.238:3306/ds_1?useSSL=false&useUnicode=true&characterEncoding=UTF8&autoReconnect=true
   
   shardingRule:
    tables:
      virgo_trans:
        actualDataNodes: ds_${0..1}.virgo_trans${0..31}
        tableStrategy:
          inline:
           shardingColumn: owner_id
           algorithmExpression: virgo_trans${Long.valueOf(owner_id) % 32}
      virgo_trans_details:
        actualDataNodes: ds_${0..1}.virgo_trans_details${0..31}
        tableStrategy:
          inline:
           shardingColumn: owner_id
           algorithmExpression: virgo_trans_details${Long.valueOf(owner_id) % 
32}
      virgo_trans_operate:
        actualDataNodes: ds_${0..1}.virgo_trans_operate${0..31}
        tableStrategy:
          inline:
           shardingColumn: owner_id
           algorithmExpression: virgo_trans_operate${Long.valueOf(owner_id) % 
32}
      virgo_accounts:
        actualDataNodes: ds_${0..1}.virgo_accounts${0..31}
        tableStrategy:
          inline:
           shardingColumn: owner_id
           algorithmExpression: virgo_accounts${Long.valueOf(owner_id) % 32}
      virgo_account_log:
        actualDataNodes: ds_${0..1}.virgo_account_log${0..31}
        tableStrategy:
          inline:
           shardingColumn: owner_id
           algorithmExpression: virgo_account_log${Long.valueOf(owner_id) % 32}
    bindingTables:
      - 
virgo_trans,virgo_trans_details,virgo_trans_operate,virgo_accounts,virgo_account_log
    defaultDatabaseStrategy:
      inline:
         shardingColumn: owner_id
         algorithmExpression: ds_${Long.valueOf(owner_id) % 2}
    defaultTableStrategy:
      none:
    defaultKeyGenerator:
       column: id
       type: SNOWFLAKE
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to