一,Sharding-Proxy
1,Sharding-Proxy依赖于zookeeper,所以先要安装zookeeper。(安装方法请看我之前博客)
2,下载apache-shardingsphere-incubating-4.0.1-sharding-proxy-bin.tar.gz。地址 https://shardingsphere.apache.org
3,解压:tar xvf apache-shardingsphere-incubating-4.0.1-sharding-proxy-bin.tar.gz
4,修改:conf下的config-xxx.yaml和server.yaml
(1),conf/config-xxx.yaml文件配置
schemaName: sharding_db
dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/ds_0?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
ds_1:
url: jdbc:mysql://127.0.0.1:3306/ds_1?serverTimezone=UTC&useSSL=false
user