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/05/17 16:59:03 UTC

[GitHub] [shardingsphere] LikeElephantintheforest opened a new issue, #17763: for this condition , which datasource will be selected?

LikeElephantintheforest opened a new issue, #17763:
URL: https://github.com/apache/shardingsphere/issues/17763

   
   my config like this : 
   
       datasource:
         trade:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: ${DB_DRIVER:com.mysql.jdbc.Driver}
           jdbcUrl: **jdbc:port/trade**
           username: ${TRADE_DB_USER}
           password: ${TRADE_DB_PASSWD}
         payment:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: ${DB_DRIVER:com.mysql.jdbc.Driver}
           jdbcUrl: **jdbc:port/payment**
           username: ${DB_USER}
           password: ${DB_PASSWD}
   
         payment-readonly:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: ${DB_DRIVER:com.mysql.jdbc.Driver}
           jdbcUrl:  **jdbc:port/payment**
           username: ${READONLY_PAYMENT_DB_USER}
           password: ${READONLY_PAYMENT_DB_PASSWD}
   
         trade-readonly:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: ${DB_DRIVER:com.mysql.jdbc.Driver}
           jdbcUrl: **jdbc:port/trade**
           username: ${READONLY_TRADE_DB_USER}
           password: ${READONLY_TRADE_DB_PASSWD}
   
   
   mysql user trade-readonly  ,  payment-readonly just have read permission;
   mysql user trade , payment  have write permission;
   
   they have same jdbcURL , same databases name  and same table schema ,difference is just mysql account;
   we want to used difference mysql account to do read or write  (we cant't use master-slave to solve it);
   
   sorry,  i don't  find   ss how to do databases sharding ...   
   
   could happen write request 2 readonly databases  like my config ?
   
   
   
   
    
   
   project based on springBoot  2.2.5.RELEASE.  + ss 4.1.0 ;


-- 
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] LikeElephantintheforest commented on issue #17763: for this condition , which datasource will be selected?

Posted by GitBox <gi...@apache.org>.
LikeElephantintheforest commented on issue #17763:
URL: https://github.com/apache/shardingsphere/issues/17763#issuecomment-1129196928

    and i. append  "readOnly: true"  to config   , it's necessary ?


-- 
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] terrymanu commented on issue #17763: for this condition , which datasource will be selected?

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #17763:
URL: https://github.com/apache/shardingsphere/issues/17763#issuecomment-1164450901

   The version 4.x is out of service, please try 5.x


-- 
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] terrymanu closed issue #17763: for this condition , which datasource will be selected?

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #17763: for this condition , which datasource will be selected?
URL: https://github.com/apache/shardingsphere/issues/17763


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