Re: Database Conversion

From: Steve Holdoway <steve(dot)holdoway(at)firetrust(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Database Conversion
Date: 2008-09-04 20:03:16
Message-ID: 20080905080316.8c88dcd4.steve.holdoway@firetrust.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, 4 Sep 2008 09:24:34 -0400
Carol Walter <walterc(at)indiana(dot)edu> wrote:

> Hello, All,
>
> I have a new faculty member who has a large database that is in
> MySQL. We don't support MySQL so the database needs to be ported to
> PostgreSQL. Her GA, who know MySQL, says that he has a query that he
> will run that will put the data into postgres. I thought that the
> data would have to be output to a text file and then copied into
> postgres. I don't know MySQL. I've done a conversion from Oracle
> and this is how I did it. Is he correct that he can put the data
> into a postgres database by running a MySQL query? It doesn't sound
> possible to me.
>
> Carol
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
I'd use mysqldump to create 2 files: the first being the schema, which I'd tweak to suit ( implementing tablespaces for example ), and then a second dump, which exports the data in a format that is acceptable to postgres.

That way, you end up with what you want in a simple, repeatable manner.

If it's mysql 5 then the stored procedures may need to be converted - I know there are tools out there, but haven't used them and can't comment.

Steve
--
Steve Holdoway <steve(dot)holdoway(at)firetrust(dot)com>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Carol Walter 2008-09-04 20:04:00 Re: Database Conversion
Previous Message Alan Scott 2008-09-04 19:42:00 Re: Database Conversion