Nuby migration question -- data migration, MySQL => postgres


#1

How do I best migrate the data? For small databases I can text-edit the
dump file from
MySQL. The postgresql compatibility switch doesn’t help on mysqldump.
Any ideas. Can
MySQL export CSV that postgresql can import ?

W Fred


#2

On Apr 29, 2006, at 1:42 PM, Warren S. wrote:

How do I best migrate the data? For small databases I can text-
edit the dump file from MySQL. The postgresql compatibility switch
doesn’t help on mysqldump. Any ideas. Can MySQL export CSV that
postgresql can import ?

Yes, PostgreSQL can import a CSV. :slight_smile:

I’ve also worked on a rake task in the past that would talk to a
MySQL db (Rails app) and then after I generate the PostgreSQL db with
the same schema (with the different field types)… I would just run
rake mysql2pgsql and it’d go through a yaml -> model -> save process.
It worked pretty well on a few projects.

Email me off list and I’ll see what I can dig up this week for you.

-Robby

Robby R.
Founder & Executive Director

PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting


www.robbyonrails.com

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4968 [fax]


#3

On Apr 29, 2006, at 6:53 PM, Robby R. wrote:

I’ve also worked on a rake task in the past that would talk to a
MySQL db (Rails app) and then after I generate the PostgreSQL db
with the same schema (with the different field types)… I would
just run rake mysql2pgsql and it’d go through a yaml -> model ->
save process. It worked pretty well on a few projects.

Email me off list and I’ll see what I can dig up this week for you.

Also, there is this project:

http://gborg.postgresql.org/project/mysql2psql/projdisplay.php

Cheers,

Robby

Robby R.
Founder & Executive Director

PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting


www.robbyonrails.com

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4968 [fax]