Re : Importing *huge* mysql database into pgsql - Mailing list pgsql-general

From Laurent ROCHE
Subject Re : Importing *huge* mysql database into pgsql
Date
Msg-id 181280.80130.qm@web34410.mail.mud.yahoo.com
Whole thread Raw
List pgsql-general
In addtion to mysql2pgsql (which we used and worked fine for us), you might want to have a look DDL-Utils
http://db.apache.org/ddlutils/

It can convert a schema and data from one RDBMs to another. It is supposed to work from MySQL to PG, although I haven't
usedit this way (I use it from PG to Derby). 
The DDL-Utils mailing list is really reactive, so I am sure they will give you a hand if you get stuck (if you were
choosingto go down that route). 


Have fun,
L@u
The Computing Froggy

----- Message d'origine ----
De : Richard Huxton <dev@archonet.com>
À : .ep <erick.papa@gmail.com>
Cc : pgsql-general@postgresql.org
Envoyé le : Mardi, 6 Mars 2007, 15h54mn 02s
Objet : Re: [GENERAL] Importing *huge* mysql database into pgsql

.ep wrote:
> Hello,
>
> I would like to convert a mysql database with 5 million records and
> growing, to a pgsql database.

And where's the huge database?

> All the stuff I have come across on the net has things like
> "mysqldump" and "psql -f", which sounds like I will be sitting forever
> getting this to work.

Well, there's not much of an alternative to exporting from one system
and importing to another. If you do find a better way, patent it!

This is probably a sensible place to start for converting schemas:
   http://pgfoundry.org/projects/mysql2pgsql

Then, you'll face two problems:
1. Invalid data in your mysql dump (e.g. dates like 0000-00-00)
2. Mysql-specific usage in your application

Then you might want to examine any performance issues (where your
application code has been tuned to work well with MySQL but not
necessarily PG).

Shouldn't be more than a day's work, maybe just 1/2 a day. I like to
build these things up as sets of perl scripts. That way when I notice
"one more thing" I can re-run my scripts from wherever the problem was.

Oh - if you come up with any improvements in mysql2pgsql then let the
developers know - I'm sure they'll be interested.

Good luck!
--
   Richard Huxton
   Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster








___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com

pgsql-general by date:

Previous
From: "Reuven M. Lerner"
Date:
Subject: Re: Database slowness -- my design, hardware, or both?
Next
From: Chris Browne
Date:
Subject: Re: Importing *huge* mysql database into pgsql