1. 启动docker
进入根目录执行 docker-compose up。
当看到如下相关信息表示相应服务已经成功启动:
- mysql
canal-db | 2022-01-19T07:29:51.996555Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
canal-db | 2022-01-19T07:29:52.033543Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
canal-db | 2022-01-19T07:29:52.699673Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
canal-db | 2022-01-19T07:29:52.708262Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.27' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
- zookeeper
canal-zk | 2022-01-19 07:37:57,891 [myid:1] - INFO [main:RequestThrottler@75] - zookeeper.request_throttler.shutdownTimeout = 10000
canal-zk | 2022-01-19 07:37:57,900 [myid:1] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@137] - PrepRequestProcessor (sid:0) started, reconfigEnabled=false
canal-zk | 2022-01-19 07:37:58,296

本文介绍如何使用Canal将MySQL的数据变更同步至Kafka,并通过具体步骤展示整个过程,包括启动服务、创建数据库表、执行SQL命令及消费消息。
最低0.47元/天 解锁文章

4139

被折叠的 条评论
为什么被折叠?



