User Manual
Proxy
- Download the latest version of Sharding-Proxy from https://github.com/sharding-sphere/sharding-sphere-doc/raw/master/dist/sharding-proxy-3.0.0.tar.gz
- If using docker,execute command
docker pull shardingsphere/sharding-proxy
to get image. More details please referenceDocker Image.
- Modify the
conf/server.yaml
and conf/config-xxx.yaml
file after decompression, and configure the sharding rule and master-slave rule. Please reference Configuration Manual.
- Run
bin/start.sh
on Linux, or bin/start.bat
on Windows to start Sharding-Proxy. If you want to set port and configuration file, please refer to quick-start.
- Connect to it by means of any client tools, e.g.
mysql -u root -h 127.0.0.1 -P 3307
Registry usage
If you want to use the orchestration for Sharding-Proxy, the registry is necessary. Please refer to Supported Registry Centers for more detail.
Zookeeper
- Sharding-Proxy provides Zookeeper registry by default. You only need to configure the registry according to the registry configuration.
Etcd
- Delete
sharding-orchestration-reg-zookeeper-curator-${sharding-sphere.version}.jar
in the lib directory of Sharding-Proxy.
- Download Etcd solution jar from Maven repository, here is the latest version.
- Put the downloaded jar package in the lib directory of Sharding-Proxy.
- Configure the registry according to the registry configuration.
Others
- Delete
sharding-orchestration-reg-zookeeper-curator-${sharding-sphere.version}.jar
in the lib directory of Sharding-Proxy.
- Implement the logic coding using SPI to create jar package, and put it in the lib directory of Sharding-Proxy.
- Configure the registry according to the registry configuration.
Notices
- The default port of Sharding-Proxy is 3307, user can change it by passing the port number on startup script, e.g.
bin/start.sh 3308
.
- Sharding-Proxy use conf/server.yaml to configure registry-center, authentication and common properties.
- Sharding-Proxy support multiple logic schema, for every configuration file which prefix as
config-
, and suffix as .yaml
.