2

Is possible to migrate data from a MySQL database to MongoDB? If yes what is the right way to do that? I have this problem because i want to rewrite my PHP project in RoR.

0

4 Answers 4

1

Why switch the database at all? Ruby can access MySQL as well...?

Check this out: http://sequel.rubyforge.org/

Sign up to request clarification or add additional context in comments.

2 Comments

Why the downvote? I think from the OP's question, Sequel might be a simpler option, than a complete architecture-stack-switch, as the OP didn't really clarify why they really wanted MongoDB
I think its a valid answer because the OP mentions that this is a problem that he's run into because of switching languages and as Lukas points out, that is not necessarily a problem. +1
1

Yes, but you'll need to redesign the schema since MongoDB is a document store and not a relational database management system (RDBMS) like MySQL.

When you have decided on the MongoDB schema, you would write a simple utility in your favourite language that selects from the MySQL database, transforms the records to suit your new schema, and inserts them into your MongoDB database.

Comments

1

Please try my plugin.

http://code.google.com/p/sql-to-nosql-importer/

Comments

0

Yes, Mysql to mongodb, it can be migrate easily, I am sharing a URL when You will get the exact work in very simple way. You Have to follow to steps.

1.Mapping database structure

2.Export the data and import it according to the defined structure.

To see more detail , follow this link https://dzone.com/articles/how-migrate-mysql-mongodb

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.