Login to Lightbox account

pg2mysql converter (PostgreSQL to MySQL Converter)

The pg2mysql converter is an online tool to convert/migrate existing PostgreSQL databases into MySQL. Simply dumping from Postgres and importing to MySQL does not work because of differences in syntax and data types.

To use this converter, just create a postgres SQL dump (pg_dump -U username -s dbname --inserts --format p -f dbname.sql), and copy and paste it into the text area below. Click the Convert to MySQL button and the page will re-load with your new MySQL code that you can copy out of the textarea into a text editor to save and import into your MySQL database.

For large files or sensitive databases that you dont feel comfortable uploading to our website, you can download the software which now (as of 1.3) contains a command line version that can process extremely large files (many gigabytes) without a problem.

Download the Source

Due to popular demand, pg2mysql has now been released under the GPL. Feel free to download and use. For a list of changes between versions, see the README

Paste PostgreSQL dump file here

- No its not perfect
- Yes it discards ALL stored procedures
- Yes it discards ALL views
- Yes you can email us suggestsions:
    - In emails, please include the Postgres code, and the expected MySQL code


Latest Version:
Jul 20, 2011

Older Versions