boot-vue commented on issue #18653:
URL:
https://github.com/apache/shardingsphere/issues/18653#issuecomment-1169471591
> What is your configuration and database type?
`mysql 8`
```yml
spring:
shardingsphere:
datasource:
names: node1,node2
node1:
type: com.zaxxer.hikari.HikariDataSource
jdbc-url:
jdbc:mysql://xxxxxxx:3307/oooo?characterEncoding=utf8&useSSL=false&autoReconnect=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: vvvv
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
pool-name: ccc1
maximum-pool-size: 25
max-lifetime: 900000
validation-timeout: 2000
idle-timeout: 60000
minimum-idle: 15
node2:
type: com.zaxxer.hikari.HikariDataSource
jdbc-url:
jdbc:mysql://oooooo:3308/oooo?characterEncoding=utf8&useSSL=false&autoReconnect=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: cccccc
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
pool-name: vvvvv2
maximum-pool-size: 25
max-lifetime: 900000
validation-timeout: 2000
idle-timeout: 60000
minimum-idle: 15
rules:
readwrite-splitting:
data-sources:
oooo:
type: Static
props:
write-data-source-name: node1
read-data-source-names: node2
load-balancer-name: random
load-balancers:
random:
type: RANDOM
```
--
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]