4RSENALZ opened a new issue, #29374:
URL: https://github.com/apache/shardingsphere/issues/29374

   
   
![ds_0](https://github.com/apache/shardingsphere/assets/143997961/bdb5bc5a-7a66-4ac4-9fda-a9eab8e01cd9)
   Even thought I've "use sharding_db", I still get ERROR 1046
   It seems like my datasource named ds_0 wasn't created successfully?
   If I use " create table if not exists t_order(order_id BIGINT NOT 
NULL,user_id INT NOT NULL,status VARCHAR(50),PRIMARY KEY (order_id));" ,then 
the table can be successfully created, but it is created in the sharding_db, 
not in the demo_ds_0
   
![shardingdb](https://github.com/apache/shardingsphere/assets/143997961/116f60c2-0f35-4dea-a467-6a95bb720fe2)
   
   My config-sharding.yaml:
   ```
   databaseName: 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
       minPoolSize: 1
   
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: ds_${0}.t_order_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_inline
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: snowflake
         auditStrategy:
           auditorNames:
             - sharding_key_required_auditor
           allowHintDisable: true
   
     bindingTables:
       - t_order
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
     defaultAuditStrategy:
       auditorNames:
         - sharding_key_required_auditor
       allowHintDisable: true
   
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_${0}
       t_order_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_${0}
   
     keyGenerators:
       snowflake:
         type: SNOWFLAKE
   
     auditors:
       sharding_key_required_auditor:
         type: DML_SHARDING_CONDITIONS
   
   - !BROADCAST
     tables:
       - t_address
   
   ```
   My databases:
   
![demo_ds_0](https://github.com/apache/shardingsphere/assets/143997961/7646e4c1-0a06-4156-8378-400895ccd6ce)
   Pls can someone help me to solve this problem


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

Reply via email to