Deepan -
I don't think you are going to find a utility to do exactly what you want and will need to write a simple application. There are a lot of local issues to be resolved:
* Who are the field types going to be mapped to MongoDB. For basic types this won;t be a large issue but don;t be surprised if the database has non-basic types.
* How to tell if a record has been updated/inserted?
I created a simple sample application that should get you started:
I tested the application with the sakila sample database and MariaDB.
java -cp lib/*.jar migrate.mongodb_user20150830.MigrateFromJdbc \
--jdbc-class=org.mariadb.jdbc.Driver \
--jdbc=jdbc:mysql://localhost:3306/sakila?user=root&password= \
--mongodb=mongodb://localhost:27017/temp \
--table=film_actor
That gives a 'film_actor" collection in the "temp" database:
> db.film_actor.findOne()
"_id" : ObjectId("55e39548c02cac17cea85b69"),
"actor_id" : NumberLong(1),
"film_id" : NumberLong(1),
"last_update" : ISODate("2006-02-15T05:00:00Z")
Let me know if you have any questions.
Rob.