davidzollo commented on code in PR #8884:
URL: https://github.com/apache/seatunnel/pull/8884#discussion_r2038679256


##########
docs/zh/connector-v2/source/MySQL-CDC.md:
##########
@@ -0,0 +1,355 @@
+# MySQL CDC
+
+> MySQL CDC Source 连接器
+
+## 支持这些引擎
+
+> SeaTunnel Zeta<br/>
+> Flink <br/>
+
+## 描述
+
+MySQL CDC连接器允许从MySQL数据库读取快照和增量数据. 本文档描述了如何设置MySQL CDC连接器以针对MySQL数据库运行SQL查询.
+
+## 主要功能
+
+- [ ] [批处理](../../concept/connector-v2-features.md)
+- [x] [流处理](../../concept/connector-v2-features.md)
+- [x] [精确一次](../../concept/connector-v2-features.md)
+- [ ] [列投影](../../concept/connector-v2-features.md)
+- [x] [并行度](../../concept/connector-v2-features.md)
+- [x] [支持自定义分片](../../concept/connector-v2-features.md)
+
+## 支持的数据源信息
+
+| 数据源   | 支持的版本                                                                
                                                                                
| 驱动                       |               Url                |                 
               Maven                                 |
+|-------|------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|----------------------------------|----------------------------------------------------------------------|
+| MySQL | <li> [MySQL](https://dev.mysql.com/doc): 5.5, 5.6, 5.7, 8.0.x 
</li><li> [RDS MySQL](https://www.aliyun.com/product/rds/mysql): 5.6, 5.7, 
8.0.x </li> | com.mysql.cj.jdbc.Driver | jdbc:mysql://localhost:3306/test | 
https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.28 |
+
+## 依赖
+
+### 安装Jdbc驱动
+
+#### 对于Flink引擎
+
+> 1. 你需要确保 [jdbc 驱动 jar 
包](https://mvnrepository.com/artifact/mysql/mysql-connector-java) 已经放在目录 
`${SEATUNNEL_HOME}/plugins/`.
+
+#### 对于SeaTunnel Zeta引擎
+
+> 1. 你需要确保 [jdbc 驱动 jar 
包](https://mvnrepository.com/artifact/mysql/mysql-connector-java) 已经放在目录 
`${SEATUNNEL_HOME}/lib/`.
+
+### 创建MySQL用户
+
+您必须定义一个MySQL用户,该用户对Debezium MySQL连接器所监控的所有数据库拥有适当的权限.
+
+1. 创建MySQL用户:
+
+```sql
+mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
+```
+
+2. 给用户赋予所需权限:
+
+```sql
+mysql> GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION 
CLIENT ON *.* TO 'user' IDENTIFIED BY 'password';
+```
+
+3. 最终确定用户权限:
+
+```sql
+mysql> FLUSH PRIVILEGES;
+```
+
+### 启用MySQL Binlog
+
+一定要为MySQL复制启用二进制日志。二进制日志记录事务更新以供复制工具传播更改.
+
+1. 检查`log-bin`是否已经设置为on:
+
+```sql
+mysql> show variables where variable_name in ('log_bin', 'binlog_format', 
'binlog_row_image', 'gtid_mode', 'enforce_gtid_consistency');
++--------------------------+----------------+
+| Variable_name            | Value          |
++--------------------------+----------------+
+| binlog_format            | ROW            |
+| binlog_row_image         | FULL           |
+| enforce_gtid_consistency | ON             |
+| gtid_mode                | ON             |
+| log_bin                  | ON             |
++--------------------------+----------------+
+5 rows in set (0.00 sec)
+```
+
+2. 如果以上结果不一致, 配置你的MySQL server配置文件(`$MYSQL_HOME/mysql.cnf`) 
,配置文件中包含以下属性,这些属性在以下表格中有描述:
+
+```
+# Enable binary replication log and set the prefix, expiration, and log format.
+# The prefix is arbitrary, expiration can be short for integration tests but 
would
+# be longer on a production system. Row-level info is required for ingest to 
work.
+# Server ID is required, but this will vary on production systems
+server-id         = 223344
+log_bin           = mysql-bin
+expire_logs_days  = 10
+binlog_format     = row
+# mysql 5.6+ requires binlog_row_image to be set to FULL
+binlog_row_image  = FULL
+
+# enable gtid mode
+# mysql 5.6+ requires gtid_mode to be set to ON
+gtid_mode = on
+enforce_gtid_consistency = on
+```
+
+3. 重启MySQL Server
+
+```shell
+/etc/inint.d/mysqld restart
+```
+
+4. 修改之后再检查一次binlog的状态:
+
+MySQL 5.5:
+
+```sql
+mysql> show variables where variable_name in ('log_bin', 'binlog_format', 
'binlog_row_image', 'gtid_mode', 'enforce_gtid_consistency');
++--------------------------+----------------+
+| Variable_name            | Value          |
++--------------------------+----------------+
+| binlog_format            | ROW            |
+| log_bin                  | ON             |
++--------------------------+----------------+
+5 rows in set (0.00 sec)
+```
+
+MySQL 5.6+:
+
+```sql
+mysql> show variables where variable_name in ('log_bin', 'binlog_format', 
'binlog_row_image', 'gtid_mode', 'enforce_gtid_consistency');
++--------------------------+----------------+
+| Variable_name            | Value          |
++--------------------------+----------------+
+| binlog_format            | ROW            |
+| binlog_row_image         | FULL           |
+| enforce_gtid_consistency | ON             |
+| gtid_mode                | ON             |
+| log_bin                  | ON             |
++--------------------------+----------------+
+5 rows in set (0.00 sec)
+
+MySQL 8.0+:
+```sql
+show variables where variable_name in ('log_bin', 'binlog_format', 
'binlog_row_image', 'gtid_mode', 'enforce_gtid_consistency')
++--------------------------+----------------+
+| Variable_name            | Value          |
++--------------------------+----------------+
+| binlog_format            | ROW            |
+| binlog_row_image         | FULL           |
+| enforce_gtid_consistency | OFF            |
+| gtid_mode                | OFF            |
+| log_bin                  | ON             |
++--------------------------+----------------+  
+     

Review Comment:
   ```suggestion
        5 rows in set (0.00 sec)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to