每个用于读取 binlog 的 MySQL 数据库客户端都应该有一个唯一的 id,称为 Server id。 MySQL 服务器将使用此 id 来维护网络毗连和 binlog 位置。 因此,假如差别的作业共享雷同的 Server id, 则可能导致从错误的 binlog 位置读取数据。 因此,建议通过为每个 Reader 设置差别的 Server id , 假设 Source 并行度为 4,server id 设置必须:serverId(“5400-5405”),5405-5400=5 >= 4。来为 4 个 Source readers 中的每一个分配唯一的 Server id。 查看mysql链接发现
select * from information_schema.processlist where user = ‘flink-cdc’;