X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2BD7D9FA4EA for ; Thu, 18 May 2006 12:22:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 25647-02 for ; Thu, 18 May 2006 12:22:42 -0300 (ADT) X-Greylist: delayed 01:00:08.63506 by SQLgrey- Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by postgresql.org (Postfix) with ESMTP id 8A2E09FA293 for ; Thu, 18 May 2006 12:22:37 -0300 (ADT) Received: from [192.169.1.5] ([71.101.6.8]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IZG00GAFT9NN1C0@vms044.mailsrvcs.net> for pgsql-sql@postgresql.org; Thu, 18 May 2006 09:22:36 -0500 (CDT) Date: Thu, 18 May 2006 10:23:12 -0400 From: Joe Subject: Re: MySQL DB to PostgresSQL DB In-reply-to: <4425c4c70605151519l4b698edbs7e11b12a697f495d@mail.gmail.com> To: pgsql-sql@postgresql.org Message-id: <446C8350.5010606@freedomcircle.net> Organization: Freedom Circle, LLC MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <4425c4c70605151519l4b698edbs7e11b12a697f495d@mail.gmail.com> User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/143 X-Sequence-Number: 25174 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