This is an automated email from the ASF dual-hosted git repository.
jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 1307d6371d2 Add mysql to doris documentation (#39)
1307d6371d2 is described below
commit 1307d6371d2169bb2cfcf575272734d8b26ef51d
Author: caoliang-web <[email protected]>
AuthorDate: Fri Aug 12 18:49:01 2022 +0800
Add mysql to doris documentation (#39)
Add mysql to doris documentation
---
docs/ecosystem/mysql-to-doris.md | 103 ++++++++++++++++++++
.../current/ecosystem/mysql-to-doris.md | 104 +++++++++++++++++++++
sidebars.json | 1 +
3 files changed, 208 insertions(+)
diff --git a/docs/ecosystem/mysql-to-doris.md b/docs/ecosystem/mysql-to-doris.md
new file mode 100644
index 00000000000..51605d72d91
--- /dev/null
+++ b/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/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/mysql-to-doris.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/ecosystem/mysql-to-doris.md
new file mode 100644
index 00000000000..5b924a1b510
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/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建表语句)
diff --git a/sidebars.json b/sidebars.json
index 21f6820e28c..a6ad696f2f8 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -185,6 +185,7 @@
"ecosystem/audit-plugin",
"ecosystem/flink-doris-connector",
"ecosystem/spark-doris-connector",
+ "ecosystem/mysql-to-doris",
"ecosystem/datax",
"ecosystem/logstash",
"ecosystem/cloudcanal",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]