通用操作
一、配置mysql数据库,登录mysql数据库
①、添加用户:
create user 'canal'@'%' identified by 'Canal@123456';
②、给用户授权:
grant SELECT, REPLICATION SLAVE, REPLICATION CLIENT on *.* to 'canal'@'%' identified by 'Canal@123456';
③、在MySQL配置文件my.cnf设置如下信息
④、改了配置文件之后,重启MySQL,使用命令查看是否打开binlog模式:
⑤、查看binlog日志文件列表
⑥、查看当前正在写入的binlog文件
⑦、MySQL服务器配置完成
单机版安装:
一、执行通用操作
二、上传安装包(canal.deployer-1.1.5.tar.gz)并解压
tar -zxvf canal.deployer-1.1.5.tar.gz
三、打开配置文件conf/example/instance.properties,配置信息如下:
注意canal.instance.filter.regex这个配置参数:(集群方式同样处理)<