当前位置:网站首页>MaxWell抓取数据
MaxWell抓取数据
2022-07-30 14:10:00 【未来影子】
MaxWell安装及配置
提前准备好MaxWell软件包
tar -zxvf /opt/software/maxwell-1.25.0.tar.gz -C /opt/module/
1、在 MySQL 中建立一个 maxwell 库用于存储 Maxwell 的元数据
mysql -uroot -p000000
mysql> CREATE DATABASE maxwell;
2、设置安全级别
mysql> set global validate_password_length=4;
mysql> set global validate_password_policy=0;
3、分配一个账号可以操作该数据库
GRANT ALL ON maxwell.* TO 'maxwell'@'%' IDENTIFIED BY '000000';
4、分配这个账号可以监控其他数据库的权限
GRANT SELECT ,REPLICATION SLAVE , REPLICATION CLIENT ON *.* TO [email protected]'%';
Maxwell监控抓取MySQL数据
1、拷贝配置文件
cp config.properties.example config.properties
2、修改配置文件
producer=kafka
kafka.bootstrap.servers=hadoop102:9092,hadoop103:9092,hadoop104:9092
#需要添加
kafka_topic=ods_base_db_m
# mysql login info
host=hadoop102
user=maxwell
password=000000
#需要添加 初始化会用
client_id=maxwell_1
注意:
- 默认还是输出到指定 Kafka 主题的一个 kafka 分区,因为多个分区并行可能会打乱 binlog 的顺序
- 如果要提高并行度,首先设置 kafka 的分区数>1,然后设置 producer_partition_by 属性
- producer_partition_by=database|table|primary_key|random| column
3、启动maxwell
/opt/module/maxwell-1.25.0/bin/maxwell --config /opt/module/maxwell-1.25.0/config.properties
4、启动kafka消费客户端(前提先启动zookeeper)
bin/kafka-console-consumer.sh --bootstrap-server hadoop102:9092 --topic ods_base_db_m
5、操作数据库,发现消费者消费的信息
边栏推荐
- 业内人士真心话:只会测试没有前途的,我慌了......
- Understand the Chisel language. 29. Chisel advanced communication state machine (1) - communication state machine: take the flash as an example
- sql server安装失败怎么办(sql server安装不了怎么办)
- Six-faced ant financial clothing, resisting the bombardment of the interviewer, came to interview for review
- 代码杂谈:从一道面试题看学会Rust的难度
- CF603E Pastoral Oddities
- pytorch与keras的相互转换(代码以LeNet-5为例)
- Flask Framework - Flask-Mail Mail
- 近两年激光雷达运动物体分割论文阅读小结
- 关于容器的小案例
猜你喜欢
A Small Case About Containers
吃透Chisel语言.29.Chisel进阶之通信状态机(一)——通信状态机:以闪光灯为例
Conversion between pytorch and keras (the code takes LeNet-5 as an example)
2022年,目前大环境下还适合转行软件测试吗?
ECCV 2022 | 通往数据高效的Transformer目标检测器
还在说软件测试没有中年危机?9年测试工程师惨遭淘汰
00 testers of seasoning after nearly a year, whether to change careers or to learn the software testing students summarized the following heart advice
百家号取消接口发文功能:插外链获权重被堵死
那些破釜沉舟入局Web3.0的互联网精英都怎么样了?
我为何从开发人员转做测试,3年软件测试工程师,带你聊聊这其中的秘辛
随机推荐
近两年激光雷达运动物体分割论文阅读小结
Eight years of testing experience, why was the leader criticized: the test documents you wrote are not as good as those of fresh graduates
OFDM Sixteen Lectures 3- OFDM Waveforms
ARC117E零和范围2
The truth of the industry: I will only test those that have no future, and I panic...
MIMO雷达波形设计
HCIP(第十五天) —— 交换机(一)
时序数据库在船舶风险管理领域的应用
Allure进阶-动态生成报告内容
Classic test interview questions set - logical reasoning questions
Data Middle Office Construction (5): Breaking Enterprise Data Silos and Extracting Data Value
Flask Framework - Flask-Mail Mail
ccs软件的使用(靠谱挣钱的app软件)
MySQL客户端工具的使用与MySQL SQL语句
获取Google Advertising ID作为唯一识别码
ECCV 2022 | 通往数据高效的Transformer目标检测器
Allure Advanced - Dynamically Generate Report Content
激光雷达点云语义分割论文阅读小结
CF780G Andryusha and Nervous Barriers
ECCV 2022 | Towards Data Efficient Transformer Object Detectors