Reputation: 1510
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.
Upvotes: 2
Views: 3376
Reputation: 1
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
Upvotes: 0
Reputation: 547
Please try my plugin.
http://code.google.com/p/sql-to-nosql-importer/
Upvotes: 1
Reputation: 925
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.
Upvotes: 1
Reputation: 221275
Why switch the database at all? Ruby can access MySQL as well...?
Check this out: http://sequel.rubyforge.org/
Upvotes: 1