Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently migrating a web application from one platform to a different one, and part of this migration involves moving data from a Postgres DB to a MySQL DB. The table structures will not be the same, so I am wondering what are some suggestions on moving table contents, but not structure, from one Db to another? By this I mean moving all row data in a given table, to a different row in a different table in a different database that does not share the same table structure. The app is fairly small, and this will be a one time migration, so I don't mind if the process is manual for each row.

I know just enough SQL to be dangerous, so I have been looking at what tools are available for a noobs. Is this something I could do in Navicat? Any advice would be greatly appreciated.

share|improve this question
You may have better luck with this question on Database Administrators - I can move it if you'd like. – voretaq7 Jul 22 '13 at 20:38

The approach I would use would be based on the new structure. For every table in the new structure, come up with a SQL query that pulls data from the old structure and drops it into a basic CSV format, then import to the new structure. I'm glossing over things like making sure keys match, ensuring you always get the same representation of data sets with the new structure, etc.

share|improve this answer

This sort of thing is just what tools like Pentaho Kettle, Talend Studio, and CloverETL are for; the general category of tools is ETL ("Extract; Transform; Load").

Unfortunately, their learning curve can be very steep, so it may well be simpler to just write some queries to extract CSV that you can COPY into the new DB, as John advises.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.