This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new f30553e0fe [tools](mysql2doris)add mysql to doris documentation #11726
f30553e0fe is described below

commit f30553e0fe5af94fd87241ca2406ad6b5dda5dac
Author: caoliang-web <71004656+caoliang-...@users.noreply.github.com>
AuthorDate: Fri Aug 12 15:44:35 2022 +0800

    [tools](mysql2doris)add mysql to doris documentation #11726
---
 docs/en/docs/ecosystem/mysql-to-doris.md    | 103 +++++++++++++++++++++++++++
 docs/zh-CN/docs/ecosystem/mysql-to-doris.md | 104 ++++++++++++++++++++++++++++
 2 files changed, 207 insertions(+)

diff --git a/docs/en/docs/ecosystem/mysql-to-doris.md 
b/docs/en/docs/ecosystem/mysql-to-doris.md
new file mode 100644
index 0000000000..51605d72d9
--- /dev/null
+++ b/docs/en/docs/ecosystem/mysql-to-doris.md
@@ -0,0 +1,103 @@
+---
+{
+
+    "title": "Mysql to Doris",
+    "language": "en"
+
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, 
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Mysql to Doris
+
+mysql to doris is mainly suitable for automating the creation of doris odbc 
tables, mainly implemented with shell scripts
+
+## manual
+
+mysql to doris code 
[here](https://github.com/apache/doris/tree/master/extension/mysql_to_doris)
+
+### Directory Structure
+
+```text
+├── mysql_to_doris
+│   ├── conf
+│   │  ├── doris.conf
+│   │  ├── mysql.conf
+│   │  └── tables
+│   ├── all_tables.sh
+│   │
+└── └── user_define_tables.sh   
+```
+
+1. all_tables.sh 
+
+   This script mainly reads all the tables under the mysql specified library 
and automatically creates the Doris odbc external table
+
+2. user_define_tables.sh 
+
+   This script is mainly used for users to customize certain tables under the 
specified mysql library to automatically create Doris odbc external tables
+
+3. conf
+
+   Configuration file, `doris.conf` is mainly used to configure doris related, 
`mysql.conf` is mainly used to configure mysql related, `tables` is mainly used 
to configure user-defined mysql library tables
+
+### full
+
+1. Download using mysql to doris 
[here](https://github.com/apache/doris/tree/master/extension/mysql_to_doris)
+2. Configuration related files
+   
+   ```shell
+   #doris.conf
+   master_host=
+   master_port=
+   doris_password=
+   
+   #mysql.conf
+   mysql_host=
+   mysql_password=
+   ```
+   
+   | Configuration item | illustrate          |
+   | -------------- | ----------------------- |
+   | master_host    | Doris FE master node IP |
+   | master_port    | Doris FE query_port port |
+   | doris_password | Doris Password (default root user) |
+   | mysql_host     | Mysql IP |
+   | mysql_password | Mysql Password (default root user) |
+   
+3. Execute the `all_tables.sh` script
+
+```
+sh all_tables.sh mysql_db_name doris_db_name
+```
+After successful execution, the files directory will be generated, and the 
directory will contain `tables` (table name) and `tables.sql` (doris odbc table 
creation statement)
+
+### custom 
+
+1. Modify the `conf/tables` file to add the name of the odbc table that needs 
to be created
+2. To configure mysql and doris related information, refer to step 2 of full 
creation
+3. Execute the `user_define_tables.sh` script
+
+```
+sh user_define_tables.sh mysql_db_name doris_db_name
+```
+
+After successful execution, the user_files directory will be generated, and 
the directory will contain `tables.sql` (doris odbc table creation statement)
diff --git a/docs/zh-CN/docs/ecosystem/mysql-to-doris.md 
b/docs/zh-CN/docs/ecosystem/mysql-to-doris.md
new file mode 100644
index 0000000000..cc89126eb2
--- /dev/null
+++ b/docs/zh-CN/docs/ecosystem/mysql-to-doris.md
@@ -0,0 +1,104 @@
+---
+{
+
+    "title": "Mysql to Doris",
+    "language": "zh-CN"
+
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, 
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Mysql to Doris
+
+mysql to doris 主要适用于自动化创建doris odbc 表,主要用shell脚本实现
+
+## 使用手册
+
+mysql to doris 
代码[这里](https://github.com/apache/doris/tree/master/extension/mysql_to_doris)
+
+### 目录结构
+
+```text
+├── mysql_to_doris
+│   ├── conf
+│   │  ├── doris.conf
+│   │  ├── mysql.conf
+│   │  └── tables
+│   ├── all_tables.sh
+│   │
+└── └── user_define_tables.sh   
+```
+
+1. all_tables.sh
+
+   这个脚本主要是读取mysql指定库下的所有表,自动创建Doris odbc外表
+
+2. user_define_tables.sh
+
+   这个脚本主要用于用户自定义指定mysql库下某几张表,自动创建Doris odbc外表
+
+3. conf
+
+   
配置文件,`doris.conf`主要是配置doris相关的,`mysql.conf`主要配置mysql相关的,`tables`主要用于配置用户自定义mysql库的表
+
+### 全量
+
+1. 下载使用mysql to 
doris[这里](https://github.com/apache/doris/tree/master/extension/mysql_to_doris)
+2. 配置相关文件
+
+   ```shell
+   #doris.conf
+   master_host=
+   master_port=
+   doris_password=
+   
+   #mysql.conf
+   mysql_host=
+   mysql_password=
+   ```
+
+   | 配置项         | 说明                    |
+      | -------------- | ----------------------- |
+   | master_host    | Doris FE master节点IP   |
+   | master_port    | Doris FE query_port端口 |
+   | doris_password | Doris 密码(默认root用户) |
+   | mysql_host     | Mysql IP |
+   | mysql_password | Mysql 密码(默认root用户) |
+
+3. 执行`all_tables.sh`脚本
+
+```
+sh all_tables.sh mysql_db_name doris_db_name
+```
+
+执行成功后会生成 files目录,改目录包含`tables`(表名称) 和 `tables.sql` (doris odbc建表语句)
+
+### 自定义
+
+1. 修改`conf/tables`文件,添加需要创建doris odbc的表
+2. 配置mysql和doris相关信息,参考全量创建第2步
+3. 执行`user_define_tables.sh`脚本
+
+```
+sh user_define_tables.sh mysql_db_name doris_db_name
+```
+
+执行成功后会生成 user_files目录,改目录包含 `tables.sql` (doris odbc建表语句)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to