ShardingSphere-Proxy部署

下载shardingsphere-proxy

wget https://mirrors.bfsu.edu.cn/apache/shardingsphere/5.0.0-alpha/apache-shardingsphere-5.0.0-alpha-shardingsphere-proxy-bin.tar.gz

其他版本自行官网下载

 

拷贝合适的驱动包到工程lib目录下

(下载地址:https://repo1.maven.org/maven2/mysql/mysql-connector-java/

pgsql不需要引入

 

修改配置文件

server.yaml

authentication: #shardingsphere-proxy自身的用户设置
  users:
    root:
      password: root 

添加配置文件,并清空其他config开头的配置文件(默认情况都是注释的,不需要更改)

config-demo.yaml

schemaName: sharding_db

dataSourceCommon: #datasources通用配置
 username: root
 password: root
 connectionTimeoutMilliseconds: 30000
 idleTimeoutMilliseconds: 60000
 maxLifetimeMilliseconds: 1800000
 maxPoolSize: 50
 minPoolSize: 1
 maintenanceIntervalMilliseconds: 30000

dataSources:
 ds_0:
   url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false

 

直接启动即可

bin下的start.sh

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值