Docker-mongo

Docker-mongo

mkdir -p /data/mongo/datadir

docker run --name edc-mongo -p 27017:27017 --restart=always -e MONGO_INITDB_ROOT_USERNAME=root  -e MONGO_INITDB_ROOT_PASSWORD=12345678 -v /data/mongo/datadir:/data/db -d mongo


下载Debezium

wget https://repo1.maven.org/maven2/io/debezium/debezium-connector-mongodb/1.5.2.Final/debezium-connector-mongodb-1.5.2.Final-plugin.tar.gz



admin:   MD5:21232f297a57a5a743894a0e4a801fc3,user,admin
curl 'http://localhost:8083/connectors' -X POST -i -H "Content-Type:application/json" -d '{
  "name": "mongo-connect",
  "config": {
    "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
    "mongodb.hosts": "10.30.20.184:27017",
    "mongodb.name": "runoob",
    "mongodb.user": "root",
    "mongodb.password": "12345678",
    "collection.include.list": "*[.]*"
  }
}'

posted @ 2023-04-03 11:11  edclol  阅读(12)  评论(0编辑  收藏  举报