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 2019/06/21 05:20:33 UTC

[GitHub] [incubator-shardingsphere] luoyihang opened a new issue #2593: sharding-proxy does not work

luoyihang opened a new issue #2593: sharding-proxy does not work
URL: https://github.com/apache/incubator-shardingsphere/issues/2593
 
 
   sharding-proxy 3.1.0
   
   I only modify `server.yml` and `config-sharding.yml`
   
   I can connect to mysql using navicat(localhost:3307)
   
   but **where is no `sharding_db database`**.
   
   I don't konw where the config is wrong
   
   here are my config
   ```yml
   schemaName: sharding_db
   
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
       username: root
       password: root
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds_1:
       url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
       username: root
       password: root
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   shardingRule:
     tables:
       t_order:
         actualDataNodes: ds_${0..1}.t_order_${0..1}
         tableStrategy:
           inline:
             shardingColumn: order_id
             algorithmExpression: t_order_${order_id % 2}
         keyGeneratorColumnName: order_id
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item_${0..1}
         tableStrategy:
           inline:
             shardingColumn: order_id
             algorithmExpression: t_order_item_${order_id % 2}
         keyGeneratorColumnName: order_item_id
     bindingTables:
       - t_order,t_order_item
     defaultDatabaseStrategy:
       inline:
         shardingColumn: user_id
         algorithmExpression: ds_${user_id % 2}
     defaultTableStrategy:
       none:
     defaultKeyGeneratorClassName: io.shardingsphere.core.keygen.DefaultKeyGenerator
   ```
   
   ```yml
   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: false
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services