Synchronise the MySQL Database with MongoDB

I had a MySQL database populated with around 1000+ rows and are some empty values in particular rows.
Now, I want to synchronise the MySQL database with MongoDB, in such a way that if any data is added to the MySQL database, the same should be copied to the MongoDB. In this migration process there should not be any change is datatypes of particular fields.

Can anyone suggest to build the best solution for this?

You could use Kafka and a combination of the Debezium MySQL source connector and the MongoDB Connector for Apache Kafka as a sink.

Here are the docs for the sink perspective

Here are the docs for Debezium MySQL source
https://debezium.io/documentation/reference/stable/connectors/mysql.html

1 Like