Search Postgresql Archives

Re: I need to load mysql dump to postgres...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/2011 10:37 AM, unclebob wrote:
good noon,
subj.
I don't want to load dump to mysql etc...
Is there a program which would just parse mysql dump file and load data
to postgresql using plain sql inserts?

There's no single, simple automatic migration tool. Numerous tools exist to help. See a simple Google search for "convert mysql postgresql", the first result of which is:


http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL

For more complex jobs you may want to look at ETL tools like Pentaho or Talend, but the nature of your question suggests it's probably a fairly simple database.

It's often easiest to just hand-write the new schema, then do a data-only MySQL dump in portable mode (with inserts) and run that through psql.

Use mysqldump WITHOUT the "--all" or "-a" option so it doesn't dump as much MySQL-specific stuff, and use "--no-create-db --no-create-info" to suppress the schema definitions. Then edit out any remaining MySQL-specific stuff and feed it into psql.



--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux