Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #676
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Harry Tuttle <SOZRBLNTLEEE@spammotel.com> |
| Newsgroups | comp.databases.postgresql |
| Subject | Re: migrate from mysql to pgsql |
| Date | Fri, 30 Oct 2015 20:26:09 +0100 |
| Lines | 39 |
| Message-ID | <d9huikF79brU1@mid.individual.net> (permalink) |
| References | <n10ens$huf$1@news.m-online.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net mWURtQlHK9QnC4IsPcBxgQvt7u6Ejq+8DVVCiiQzXEi9cUJsI= |
| Cancel-Lock | sha1:DNpgOI4RlSSyLWUhl0KSgkSXMqM= |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 |
| In-Reply-To | <n10ens$huf$1@news.m-online.net> |
| Xref | csiph.com comp.databases.postgresql:676 |
Show key headers only | View raw
Magnus Warker schrieb am 30.10.2015 um 20:00:
> I would like to migrate a mysql database to pgsql.
> I would like to do it table for table.
>
> Can you export a table into a plain-text SQL file so that it can be edited and imported in pgsql?
Ora2Pg has been a reliable tool to migrate from Oracle to Postgres.
The latest release also supports migrating from MySQL to Postgres, you might want to look into that:
http://ora2pg.darold.net/
Apart from that, you can use any tool that is capable of exporting CSV files and then
import them using Postgres' COPY command.
I haven't really used MySQL but I believe SELECT ... INTO OUTFILE should be usable to do this table by table.
I use a SQL tool called SQL Workbench/J which can bulk export all tables from a database:
http://www.sql-workbench.net/
and
http://www.sql-workbench.net/manual/command-export.html
I have used that successfully for migrations from Oracle to Postgres.
Another option is to install mysql_fdw in Postgres and then simply pull the MySQL data through
SQL statements from within Postgres: http://pgxn.org/dist/mysql_fdw/
As a final note: if you need help with Postgres, you'll get better responses on the Postgres mailing list
http://www.postgresql.org/list/
Once you are registered you can also read them through a newsgroup on news.gmane.org
Back to comp.databases.postgresql | Previous | Next — Previous in thread | Next in thread | Find similar
migrate from mysql to pgsql Magnus Warker <magnux@mailinator.com> - 2015-10-30 20:00 +0100
Re: migrate from mysql to pgsql Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2015-10-30 20:26 +0100
Re: migrate from mysql to pgsql Magnus Warker <magnux@mailinator.com> - 2015-11-14 04:25 +0100
Re: migrate from mysql to pgsql Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2015-11-14 20:32 +0100
Re: migrate from mysql to pgsql Magnus Warker <magnux@mailinator.com> - 2015-11-18 17:58 +0100
Re: migrate from mysql to pgsql Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2015-11-01 22:09 +0100
Re: migrate from mysql to pgsql Luuk <luuk@invalid.lan> - 2015-11-02 09:18 +0100
Re: migrate from mysql to pgsql Magnus Warker <magnux@mailinator.com> - 2016-01-06 06:43 +0100
Re: migrate from mysql to pgsql Robert Klemme <shortcutter@googlemail.com> - 2016-01-06 13:08 +0100
Re: migrate from mysql to pgsql Magnus Warker <magnux@mailinator.com> - 2016-01-06 13:35 +0100
Re: migrate from mysql to pgsql Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2016-01-06 21:31 +0100
Re: migrate from mysql to pgsql Magnus Warker <magnux@mailinator.com> - 2016-01-31 06:21 +0100
Re: migrate from mysql to pgsql Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2016-01-31 22:19 +0100
csiph-web