Re: Importing MySQL dump into PostgreSQL 8.2 - Mailing list pgsql-general

From Chris
Subject Re: Importing MySQL dump into PostgreSQL 8.2
Date
Msg-id [email protected]
Whole thread Raw
In response to Importing MySQL dump into PostgreSQL 8.2  (Jeff Lanzarotta <[email protected]>)
Responses Re: Importing MySQL dump into PostgreSQL 8.2
List pgsql-general
Jeff Lanzarotta wrote:
> Hello,
>
> I have a MySQL dump file that I would like to import into our PostgreSQL
> 8.2 database. Is there a way to do this?

You'll need to convert the table definitions then the data.

For example, mysql has int(11) columns, postgres only has int columns.

I usually convert the tables, then do a csv dump from mysql:

select * from table into outfile '/path/to/file';

then import into postgres:

\copy table from '/path/to/file'

--
Postgresql & php tutorials
http://www.designmagick.com/

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: It's time to support GRANT SELECT,UPDATE,...,...,... ON database.* to username
Next
From: Chris
Date:
Subject: Re: SLOW Remote Connection to PostgreSQL Database