Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.