权限开通
1.找运维开启mysql的binlog,让其提供读取binlog的用户名和密码,并赋予权限:
GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON . TO ‘user’ IDENTIFIED BY ‘password’;
添加JAR包
2.将flink-sql-connector-elasticsearch7_2.11-1.11.1.jar和flink-sql-connector-mysql-cdc-1.1.0.jar添加到flink的lib目录下,也要添加到zeppelin所在pod中的某个目录下,在这里用的是/data/dependency
书写DEMO
cdcToEsDemo
%flink.conf
flink.execution.packages org