Loading
0

podman安装shardingsphere proxy

脚本:

VOL_HOME=/data/volumes;
mkdir -p /$VOL_HOME/shardingsphere-proxy/conf;
mkdir -p /$VOL_HOME/shardingsphere-proxy/ext-lib;
podman run -d \
--name shardingsphere-proxy \
-v /$VOL_HOME/shardingsphere-proxy/conf:/opt/shardingsphere-proxy/conf \
-v /$VOL_HOME/shardingsphere-proxy/ext-lib:/opt/shardingsphere-proxy/ext-lib \
-e PORT=13300 \
-p 13300:13300 \
apache/shardingsphere-proxy:5.3.1

连接mysql的话,需要将mysql的jdbc驱动放到ext-lib下。

在conf目录中新建server.yaml配置文件,内容如下:

authority:
  users:
    - user: root@%
      password: root
    - user: sharding
      password: sharding
  privilege:
    type: ALL_PERMITTED

最后编辑于:2023/2/3作者: joycode

评论已关闭