Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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

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

share|improve this question

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.

share|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

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.

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.