Thursday, January 26, 2012

MySQL - mini-migration to PostgreSQL

Today I had to perform a "nano-migration" from mysql (from a mysql dump) to postgresql, but gee I needed a refresher.

These links were very useful.

To install mysql (on opensuse).

http://en.opensuse.org/SDB:MySQL_installation

http://www.debuntu.org/how-to-create-a-mysql-database-and-set-privileges-to-a-user

To import the sql dump to mysql.
http://www.cyberciti.biz/faq/import-mysql-dumpfile-sql-datafile-into-my-database/

Enterprisedb offers a migration wizard for this kind of boring and burdensome chores:

http://www.enterprisedb.com/docs/en/8.4/migrate/Table%20of%20Contents.htm#TopOfPage



Except that it didn't do an automatic conversion of the datetime mysql type, I'm really satisfied with the results.

There are also lots of scripts and other tools available.
http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL

Other interesting references:
http://www.raditha.com/postgres/

No comments:

Post a Comment