1.下载flink
https://archive.apache.org/dist/flink/flink-1.12.2/
2.修改flink-conf.yaml
#根据自己电脑核数修改,这里我设置为4,因为系统分配了4核
jobmanager.rpc.address: localhost #主机名根据自己设定
taskmanager.numberOfTaskSlots: 4
3.下载flink-sql mysql cdc包
flink-sql-connector-mysql-cdc-1.2.0.jar
https://archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com/repository/gradle-plugin/com/alibaba/ververica/flink-sql-connector-mysql-cdc/1.2.0/flink-sql-connector-mysql-cdc-1.2.0.jar?spm=a2c6h.24085988.0.0.101c3054iDT6s8&Expires=1690131054&OSSAccessKeyId=LTAIfU51SusnnfCC&Signature=PL4xE68opO%2FTfCwsFW4HdWzjrGw%3D
4.下载fink jdbc包
https://mvnrepository.com/artifact/org.apache.flink/flink-connector-jdbc_2.11/1.12.2
5.下载flink changelog-json数据格式包
https://archiva-maven-storage-prod.oss-cn-beijing.aliyuncs.com/repository/central/com/alibaba/ververica/flink-format-changelog-json/1.2.0/flink-format-changelog-json-1.2.0.jar?Expires=1690131326&OSSAccessKeyId=LTAIfU51SusnnfCC&Signature=WHN7OVw8yGIeREN%2Bgd1Na7EbpC8%3D
6.将以上下载的jar包,上传至lib目录下
6.启动集群以及client端
#启动flink
bin/start-cluster.sh
#启动client
bin/sql-client.sh embedded
7.查看flink控制台
版权归原作者 javachen__ 所有, 如有侵权,请联系我们删除。