1、Maxwell-1.30.0及以上的版本不再支持JDK1.8,而JDK1.8支持的最后一个版本为1.29.2
2、下载Maxwell的压缩包,上传到服务器并解压
3、tar -xf maxwell-1.29.2.tar.gz
4、开启mysql的binlog功能:vim /etc/my.cnf
server-id=1
log-bin=mysql-bin
binlog_format=row
并重新加载配置项:systemctl restart mysqld
5、创建Maxwell所需数据库和用户
[root@localhost local]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 Server version: 5.7.18-log MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
# 创建数据库 mysql> create database maxwell character set utf8mb4; Query OK, 1 row affected (0.00 sec)
# 创建Maxwell用户 mysql> create user 'maxwell'@'%' identified by 'maxwell'; Query OK, 0 rows affected (0.00 sec)
# 赋予其必要权限 mysql> grant all on maxwell.* to 'maxwell'@'%'; Query OK, 0 rows affected (0.01 sec) mysql> grant select, replication client, replication slave on *.* to 'maxwell'@'%'; Query OK, 0 rows affected (0.00 sec) # 刷新配置 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> quit; Bye [root@localhost local]# mysql -umaxwell -pmaxwell -e "show databases;" mysql: [Warning] Using a password on the command line interface can be insecure. +--------------------+ | Database | +--------------------+ | information_schema | | gen | | log_analysis | | maxwell | | mysql | | performance_schema | | seatunnel | | sys | | test_seatunnel | | zutai | +--------------------+ [root@localhost local]#
6、配置Maxwell
mv config.properties.example config.properties vim config.properties
7、使用配置文件启动Maxwell
bin/maxwell --config ./config.properties
8、删除数据库的一条数据进行验证
标签:linux,affected,Maxwell,配置,maxwell,sec,mysql,OK From: https://www.cnblogs.com/dabu/p/18358479