当前位置:网站首页>canal抓取数据
canal抓取数据
2022-07-30 14:10:00 【未来影子】
canal安装及配置
提前准备好canal软件包
注意:canal解压后是散的,故需要解压在具体的canal目录上
module>mkdir canal
tar -zxvf canal.deployer-1.1.4.tar.gz -C /opt/module/canal
1、设置安全级别
mysql> set global validate_password_length=4;
mysql> set global validate_password_policy=0
2、分配一个账号(canal)可以操作数据库
mysql> GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'canal'@'%' IDENTIFIED BY 'canal' ;
canal监控抓取MySQL数据
1、修改canal/conf/canal.properties
canal.serverMode = kafka
canal.mq.servers = hadoop102:9092,hadoop103:9092,hadoop104:9092
2、修改conf/example/instance.properties
canal.instance.master.address=hadoop102:3306
canal.instance.dbUsername=canal
canal.instance.dbPassword=canal
canal.mq.topic=ods_base_db_c
3、启动canal
canal>bin/startup.sh
4、启动kafka消费客户端测试
提前开启zookeeper、kafak
bin/kafka-console-consumer.sh --bootstrap-server hadoop102:9092 --topic ods_base_db_c
5、操作数据库,查看kafak消费客户端的效果

边栏推荐
- LeetCode二叉树系列——102.二叉树的层序遍历
- 产品年度营销计划书
- The main content of terrain analysis (the special effect level of the wandering earth)
- 开始学习C语言了
- kubernate部署服务
- #第九章 子查询课后习题
- CF1320E Treeland and Viruses
- Interface automation framework, lm-easytest beta version released, use it quickly~
- The website adds a live 2d kanban girl that can dress up and interact
- A simple change for problem, knapsack problem sets of shell
猜你喜欢

DocuWare 文件管理与工作流程自动化案例研究——DocuWare 工作流程功能使在家工作的员工能够保持沟通和高效工作,支持混合环境

八年测试经验,为何惨遭领导痛批:你写的测试文档还不如刚来的应届生

LeetCode二叉树系列——102.二叉树的层序遍历

00 testers of seasoning after nearly a year, whether to change careers or to learn the software testing students summarized the following heart advice

A Small Case About Containers

Web3创始人和建设者必备指南:如何构建适合的社区?

NFTScan 与 PANews 联合发布多链 NFT 数据分析报告

开源工具推荐:高性能计算辅助工具MegPeak

pytorch与keras的相互转换(代码以LeNet-5为例)

跳槽前,把自己弄成卷王
随机推荐
Remember an experience of interviewing an outsourcing company, should you go?
网站添加能换装可互动的live 2d看板娘
网络安全——lcx的使用
以unity3d为例解读:游戏数据加密
eclipse连接SQL server数据库「建议收藏」
Why do software testing have to learn automation?Talk about the value of automated testing in my eyes
[ARC092B] Two Sequences
ECCV 2022 | 通往数据高效的Transformer目标检测器
使用bat脚本以json格式导出mongo数据库中指定表数据
How to use Databricks for data analysis on TiDB Cloud | TiDB Cloud User Guide
CF603E Pastoral Oddities
sql中ddl和dml(sql与access的区别)
LeetCode二叉树系列——116.填充每个节点的下一个右侧指针
【Vue.js 3.0源码】KeepAlive 组件:如何让组件在内存中缓存和调度?
ESP32 反复重启问题 Arduino屏蔽断电探测器
EasyV数字孪生流域|宁波智慧水利整体智治综合应用
LeetCode二叉树系列——107.二叉树的层序遍历II
(HR Interview) Most Common Interview Questions and Skilled Answers
接口自动化框架,lm-easytest内测版发布,赶紧用起来~
A Small Case About Containers