You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2020/11/15 03:25:06 UTC
[shardingsphere] branch master updated: Update doc (#8162)
This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new d381982 Update doc (#8162)
d381982 is described below
commit d381982408dee9fba373c1f60dec5123f7a0bc63
Author: Liang Zhang <te...@163.com>
AuthorDate: Sun Nov 15 11:21:33 2020 +0800
Update doc (#8162)
* Update doc
* Update doc
---
docs/document/content/features/sharding/use-norms/rdl.cn.md | 8 ++++++--
docs/document/content/features/sharding/use-norms/rdl.en.md | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/docs/document/content/features/sharding/use-norms/rdl.cn.md b/docs/document/content/features/sharding/use-norms/rdl.cn.md
index 55b78e4..191a0f3 100644
--- a/docs/document/content/features/sharding/use-norms/rdl.cn.md
+++ b/docs/document/content/features/sharding/use-norms/rdl.cn.md
@@ -21,8 +21,8 @@ ds_key=host_name:host_port:db_name:user_name:pwd
// Example
CREATE datasources (
-ds0=127.0.0.1:3306:demo_ds_2:root:pwd,
-ds1=127.0.0.1:3306:demo_ds_3:root:pwd)
+ds0=127.0.0.1:3306:demo_ds_0:root:pwd,
+ds1=127.0.0.1:3306:demo_ds_1:root:pwd)
```
- `CREATE SHARDINGRULE`,用于配置分片规则。
```sql
@@ -47,16 +47,19 @@ t_item=mod(item_id, 2)
## RDL使用实战
### 前置工作
+
1. Start the service of MySQL instances
2. Create MySQL databases (Viewed as the resources for ShardingProxy)
3. Create a role or user with creating privileges for ShardingProxy
4. Start the service of Zookeeper (For persisting configuration)
### 启动ShardingProxy
+
1. Add `governance` and `authentication` setting item to the `server.yaml` (Please refer to the example in this file)
2. Start the ShardingProxy ([Instruction](/en/quick-start/shardingsphere-proxy-quick-start/))
### 创建分布式数据库和分片表
+
1. 连接到ShardingProxy
2. 创建分布式数据库
@@ -122,6 +125,7 @@ DROP DATABASE sharding_db
```
### 注意
+
1. 当前, `DROP DB`只会移除`逻辑的分布式数据库`,不会删除用户真实的数据库 (**TODO**)。
2. `DROP TABLE`会将逻辑分片表和数据库中真实的表全部删除。
3. `CREATE DB`只会创建`逻辑的分布式数据库`,所以需要用户提前创建好真实的数据库(**TODO**)。
diff --git a/docs/document/content/features/sharding/use-norms/rdl.en.md b/docs/document/content/features/sharding/use-norms/rdl.en.md
index e5671ab..933cabe 100644
--- a/docs/document/content/features/sharding/use-norms/rdl.en.md
+++ b/docs/document/content/features/sharding/use-norms/rdl.en.md
@@ -19,8 +19,8 @@ ds_key=host_name:host_port:db_name:user_name:pwd
// Example
CREATE datasources (
-ds0=127.0.0.1:3306:demo_ds_2:root:pwd,
-ds1=127.0.0.1:3306:demo_ds_3:root:pwd)
+ds0=127.0.0.1:3306:demo_ds_0:root:pwd,
+ds1=127.0.0.1:3306:demo_ds_1:root:pwd)
```
- `CREATE SHARDINGRULE` to create sharding rule made by table rules
```sql
@@ -45,16 +45,19 @@ t_item=mod(item_id, 2)
## A common scenario for RDL
### Pre-work
+
1. Start the service of MySQL instances
2. Create MySQL databases (Viewed as the resources for ShardingProxy)
3. Create a role or user with creating privileges for ShardingProxy
4. Start the service of Zookeeper (For persisting configuration)
### Initialize ShardingProxy
+
1. Add `governance` and `authentication` setting item to the `server.yaml` (Please refer to the example in this file)
2. Start the ShardingProxy ([Instruction](/en/quick-start/shardingsphere-proxy-quick-start/))
### Create Sharding DBs and Tables
+
1. Connect to ShardingProxy
2. Create a sharding database
@@ -120,6 +123,7 @@ DROP DATABASE sharding_db
```
### Notices
+
1. Currently, `DROP DB` only removes` the logic sharding schema` instead of removing the actual databases in MySQL instance (**TODO**).
2. `DROP TABLE` will drop `the logic sharding table` and `the corresponding actual tables` in MySQL instance together.
3. `CREATE DB` just create the logic sharding schema rather than create the actual databases in MySQL instance (**TODO**).