up vote 1 down vote favorite
share [fb]

Is there any method to tranfer the data and schema from a postgresql database to mysql?

link|improve this question
feedback

2 Answers

You can try a tool like Navicat Premium. It can do a structure/data compare or copy between db's. Never tried with postgres, but did from mysql to mssql and v.v.

link|improve this answer
feedback

Pg_dump will create a plaintext SQL script with the statements needed to re-create the schema and the data. You can then import this script into mysql. You may need to tweak the script in certain places due to postgres/mysql differences.

link|improve this answer
I don't see why one should have to use a commercial tool for this, but a default pg_dump will require a LOT of tweaking to make it work with mysql. I would suggest a careful reading of the pg_dump man page with special attention to flags like data-only, inserts, schema-only, no-owner, and so on. Even so, indexes will have to be dealt with, and also views if the target mysql version does not support them. – bogeymin Sep 30 '11 at 14:23
feedback

Your Answer

 
or
required, but never shown

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