FrommyMind commented on issue #8342: URL: https://github.com/apache/seatunnel/issues/8342#issuecomment-2661895614
No issue with seatunnel version 2.3.8, and mysql 5.7 ## Step 1: Run seatunnel 2.3.8 with docker. ```bash docker network create seatunnel-network docker run -d --name seatunnel_master \ --network seatunnel-network \ --rm \ -p 5801:5801 \ apache/seatunnel:2.3.8 \ ./bin/seatunnel-cluster.sh -r master docker run -d --name seatunnel_worker_1 \ --network seatunnel-network \ --rm \ -e ST_DOCKER_MEMBER_LIST=192.168.80.3:5801 \ apache/seatunnel:2.3.8 \ ./bin/seatunnel-cluster.sh -r worker ``` ## Step 2: Run mysql 5.7 create config folder ``` mkdir /opt/mysql5.7/ ``` the `my.cnf` config file ``` [mysqld] log_bin = /var/lib/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M server-id = 1 ``` run docker ``` docker run --name mysql-5.7.44 -p23307:3306 -v /opt/mysql5.7/my.cnf:/etc/mysql/my.cnf \ -v /opt/mysql5.7/data:/var/lib/mysql \ -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7.44 ``` create user and database; create table and insert data; ```msyql create user test_user identified by 'xxxxxxxxx'; GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'test_user' ; create database test_db; use test_db; CREATE TABLE `users` ( `id` int NOT NULL AUTO_INCREMENT, `username` varchar(50) NOT NULL, `email` varchar(100) NOT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ); insert into users (username, email) values ('aaa', 'a...@example.com'),('bbb', 'b...@example.com'),('ccc', 'c...@example.com'); ``` The seatunnel config `mysql-streaming.conf`. ``` env { job.mode="STREAMING" checkpoint.interval=10000 parallelism=1 } source { MySQL-CDC { plugin_output = "fake" password="xxxxxxxxx" username=test_user base-url="jdbc:mysql://xxx.xxx.xxx.xxx:23307/test_db?useUnicode=true&useSSL=false&characterEncoding=utf8&connectionTimeZone=Asia/Shanghai&enabledTLSProtocols=TLSv1.2" startup.mode="initial" table-names=["test_db.users"] } } sink { Console { plugin_input = ["fake"] } } ``` ## Step 3: Run the job ``` /opt/seatunnel/bin/seatunnel.sh -c mysql-streaming.conf ``` -- 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