Menu

Home

Nathaniel Waisbrot

A program for converting MySQL dumps into PostgreSQL dumps. Currently works only with a limited subset of MySQL's vocabulary, and only with SQL documents output by MySQL's dump feature (i.e., not hand-crafted SQL).

Building

The project is built with Maven. The most convenient way to build is with the "shade" plugin:

$ mvn package
...
$ ls target/
...  mysql-to-postgresql-0.5.jar ...

Running

If you build a shaded executable JAR, then you can invoke the converter as

$ java -ea -jar ./target/mysql-to-postgresql-0.5.jar -mysql <path/to/dump> -outdir <path/to/dir>

The arguments are as follows

  • -mysql your MySQL dump-file
  • -outdir the directory to store the results (we create multiple input files for PostgreSQL)
  • -name (optional) the database name to use, instead of what's given in the MySQL dump
  • -nodb (optional) don't write commands for creating the database; assume that it's been created already

Discussion

  • Refalm

    Refalm - 2015-03-24

    Great!

    Now how do I use it, what are the commandline options, and do you have an example?

     
    • Nathaniel Waisbrot

      Updated. Let me know how it goes, Refaim. I haven't done anything with this in some time!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.