Use Binary Tar
Startup Steps
- Download the latest version of ShardingSphere-Proxy.
- After the decompression, revise
conf/server.yaml
and documents begin withconfig-
prefix,conf/config-xxx.yaml
for example, to configure sharding rules and readwrite-splitting rules. Please refer to Configuration Manual for the configuration method. - Please run
bin/start.sh
for Linux operating system; runbin/start.bat
for Windows operating system to start ShardingSphere-Proxy. To configure start port and document location, please refer to Quick Start.
Using database protocol
Using PostgreSQL
- Use any PostgreSQL terminal to connect, such as
psql -U root -h 127.0.0.1 -p 3307
.
Using MySQL
- Copy MySQL’s JDBC driver to folder
ext-lib/
. - Use any MySQL terminal to connect, such as
mysql -u root -h 127.0.0.1 -P 3307
.
Using openGauss
- Copy openGauss’s JDBC driver whose package prefixed with
org.opengauss
to folderext-lib/
. - Use any openGauss terminal to connect, such as
gsql -U root -h 127.0.0.1 -p 3307
.
Using metadata persist repository
Using ZooKeeper
Integrated ZooKeeper Curator client by default.
Using Etcd
- Copy Etcd’s client driver to folder
ext-lib/
.
Using Distributed Transaction
Same with ShardingSphere-JDBC. please refer to Distributed Transaction for more details.
Using user-defined algorithm
When developer need to use user-defined algorithm, should use the way below to configure algorithm, use sharding algorithm as example.
- Implement
ShardingAlgorithm
interface. - Package Java file to jar.
- Copy jar to ShardingSphere-Proxy’s
ext-lib/
folder. - Configure user-defined Java class into YAML file. Please refer to Configuration Manual for more details.
Notices
- ShardingSphere-Proxy uses
3307
port in default. Users can start the script parameter as the start port number, likebin/start.sh 3308
. - ShardingSphere-Proxy uses
conf/server.yaml
to configure the registry center, authentication information and public properties. - ShardingSphere-Proxy supports multi-logic data sources, with each yaml configuration document named by
config-
prefix as a logic data source.
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .