Tuesday, September 15, 2009

Migrate MySQL to postgres

I just googled around on how to do migration from MySQL to postgresql. I ended up with unavailable script of phyton. However, I found Use mysql-postgresql-wizard of component EnterpriseDB which can be used to . You can download the source from here:

http://downloads.enterprisedb.com/src/mysql_pg_wizard_src.zip

You need to download Apache Ant to build the source. I use Apache Ant 1.7.0. Use the following command on how to build the jar file:

ant dist

Executing the above command will produce a jar file which is MigrationWizard.jar. To get the wizard of migrating the mysql to postgres, you need to execute the jar file using the following command in the /dist directory:

java -jar MigrationWizard.jar

The following wizard should be poped up once you execute the above command.