canal是监听主mysql的binlog日志,实现和从一样能够监听到数据的变化,进而写进rabbitmq进行设置
canal安装
docker search canal
pull canal/canal-server
上传挂载文件
配置
canal.properties
instance.properties
查看mysql的master status
创建一个和canal交互的用户
创建容器
shell
docker run \
--name canal \
--privileged \
-p 11111:11111 \
--network wn_docker_net \
--ip 172.18.12.66 \
-v /usr/local/software/canal/conf/canal.properties:/home/admin/canal-server/conf/canal.properties \
-v /usr/local/software/canal/conf/instance.properties:/home/admin/canal-server/conf/example/instance.properties \
-v /usr/local/software/canal/logs:/home/admin/canal-server/logs/example \
-d canal/canal-server