From: Joe <dev@freedomcircle.net>
To: pgsql-sql@postgresql.org
Subject: Re: MySQL DB to PostgresSQL DB
Date: Thu, 18 May 2006 10:23:12 -0400
Message-ID: <446C8350.5010606@freedomcircle.net> (raw)
In-Reply-To: <4425c4c70605151519l4b698edbs7e11b12a697f495d@mail.gmail.com>
References: <4425c4c70605151519l4b698edbs7e11b12a697f495d@mail.gmail.com>
Jose Apablaza wrote:
> - Is posible to export MySQL DB to PostgreSQL DB?
> - Does PostgreSQL DB has tools to import MySQL DB?
> - If is posible, How do I need to build the DB in MySQL?, in order to
> have success in the exportation.
> - Do someone did it before?, exporting MySQL DB to PostgreSQL DB?
> - What kind of risk do we can to have in this process?
> - How long can take this process?
Yes, it's doable, but it's not as straighforward as
mysqldump -someflags mydbname | psql -someotherflags pgdbname
I suggest you start by checking the resources/articles in the MySQL
section of http://www.postgresql.org/docs/techdocs.3 (which I'm glad to
say is much better organized and comprehensive than when I had to do
it). FWIW, I converted using CSV as the intermediate format, and the
dates and timestamps were the trickiest, which required the use of
"staging" tables (with a textual representation of the columns). An
interesting side effect was discovering data inconsistencies in the
MySQL database since as part of the conversion I implemented foreign key
constraints under PostgreSQL (which were missing in the former).
Joe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@freedomcircle.net
Subject: Re: MySQL DB to PostgresSQL DB
In-Reply-To: <446C8350.5010606@freedomcircle.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox