houbb commented on issue #6302:
URL: https://github.com/apache/seatunnel/issues/6302#issuecomment-1914380106

   # more about parpare info
   
   ## admin user
   
   ```sql
   CREATE USER 'admin'@'%' IDENTIFIED BY '123456';
   GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
   flush privileges;
   ```
   
   ## enable binlog
   
   ```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, 1 warning (0.00 sec)
   ```
   
   
   
   ## init tables
   
   ### tables
   
   ```sql
   create database cdc;
   use cdc;
   
   drop table if exists user_info;
   create table user_info
   (
       id int unsigned auto_increment comment '主键' primary key,
       username varchar(128) not null comment '用户名',
       create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间',
       update_time timestamp default CURRENT_TIMESTAMP not null on update 
CURRENT_TIMESTAMP comment '更新时间'
   ) comment '用户表' ENGINE=Innodb default charset=utf8mb4 auto_increment=1;
   
   drop table if exists role_info;
   create table role_info
   (
       id int unsigned auto_increment comment '主键' primary key,
       role_name varchar(128) not null comment '角色名',
       create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间',
       update_time timestamp default CURRENT_TIMESTAMP not null on update 
CURRENT_TIMESTAMP comment '更新时间'
   ) comment '角色表' ENGINE=Innodb default charset=utf8mb4 auto_increment=1;
   ```
   
   ### data
   
   ```sql
   truncate table user_info;
   
   insert into user_info (username) values ('u1');
   insert into user_info (username) values ('u2');
   insert into user_info (username) values ('u3');
   insert into user_info (username) values ('u4');
   
   
   truncate table role_info;
   insert into role_info (role_name) values ('r1');
   insert into role_info (role_name) values ('r2');
   insert into role_info (role_name) values ('r3');
   insert into role_info (role_name) values ('r4');
   ```
   
   test: 
   
   ```
   mysql> select * from user_info;
   +----+----------+---------------------+---------------------+
   | id | username | create_time         | update_time         |
   +----+----------+---------------------+---------------------+
   |  1 | u1       | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   |  2 | u2       | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   |  3 | u3       | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   |  4 | u4       | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   +----+----------+---------------------+---------------------+
   
   mysql> select * from role_info;
   +----+-----------+---------------------+---------------------+
   | id | role_name | create_time         | update_time         |
   +----+-----------+---------------------+---------------------+
   |  1 | r1        | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   |  2 | r2        | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   |  3 | r3        | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   |  4 | r4        | 2024-01-29 17:33:42 | 2024-01-29 17:33:42 |
   +----+-----------+---------------------+---------------------+
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to