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).
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 ...
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
Great!
Now how do I use it, what are the commandline options, and do you have an example?
Updated. Let me know how it goes, Refaim. I haven't done anything with this in some time!