15806659098 commented on issue #18763:
URL: 
https://github.com/apache/shardingsphere/issues/18763#issuecomment-1172056364

   > 
   Only read-write separation is configured.
   The server.xml as follows:
   ```
    rules:
    - !AUTHORITY
      users:
        - root@%:987534
      provider:
        type: ALL_PRIVILEGES_PERMITTED
   props:
      sql-show: true
      proxy-mysql-default-version: 5.7.38
      proxy-default-port: 3310
   ```
   The config-readwrite-splitting.yaml as follows.
   ```
   databaseName: test
   dataSources:
    master:
      url: 
jdbc:mysql://10.30.24.174:3306/tcm?useUnicode=true&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC&characterEncoding=utf8&useSSL=false
      username: root
      password: 98753
      connectionTimeoutMilliseconds: 3000
      idleTimeoutMilliseconds: 5000
      maxLifetimeMilliseconds: 9000
      maxPoolSize: 50
      minPoolSize: 1
    slave:
      url: 
jdbc:mysql://10.30.24.176:3306/tcm?useUnicode=true&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC&characterEncoding=utf8&useSSL=false
      username: root
      password: 98753
      connectionTimeoutMilliseconds: 3000
      idleTimeoutMilliseconds: 5000
      maxLifetimeMilliseconds: 9000
      maxPoolSize: 50
      minPoolSize: 1
   rules:
   - !READWRITE_SPLITTING
    dataSources:
      readwrite_ds:
        type: Static
        props:
          write-data-source-name: master
          read-data-source-names: master,slave
        loadBalancerName: round
    loadBalancers:
      round:
        type: ROUND_ROBIN`
   ```


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