pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikolay Mijaylov <nmmm@nmmm.nu>
To: Bob Zoller <bob@helpermonkey.org>
To: pgsql-admin@postgreSQL.org
Subject: Re: [ADMIN] mysql to pgsql
Date: Fri, 18 Feb 2000 11:23:49 +0200
Message-ID: <000e01bf79f1$dee08ac0$ce2a18c3@skillbrokers.bg> (raw)
References: <Pine.BSO.4.21.0002171317340.24496-100000@helpermonkey.org>

Hya

1. Dump data from Mysql
        mysqldump > x
2. Open x
        joe x (or vi x)
                Look tables create data, fix types (such int(11) -> integer,
etc)
                Remove all Mysql comments, unfortunately pg, cant support
comments,
                        they begins with # if i not mistake
                Quote some data if need - tablenames, field names etc such
(create table "order" etc)
                Remove Mysql quotes if any.
                Look encoding - such \" (i suggest pg and mysql encoding is
same, so only check it)
        (all this is done with search replace)
2. Save file
3. Create new db in postgre,
4. psql the_db_name < x
5. Look errors. If any return to point 2

thats all.

Second "easy" way is to use database migrate utility under windows, with two
ODBC configured to two servers. If you do so, dump pg database after this,
check types, then drop it and import again (this is because ODBC substitute
wrong types eg int -> float for example)

After migration, dont forget to grant rights on the new database, because
they will be not transfered.

if you hava a problem, just tell me.
nmmm
--------------------------------------------------------------
The reboots are for hardware upgrades!
"http://www.nmmm.nu; <nmmm@nmmm.nu>


----- Original Message -----
From: Bob Zoller <bob@helpermonkey.org>
To: <pgsql-admin@postgreSQL.org>
Sent: ÷åòâúâòúê, Ôåâðóàðè 17, 2000 11:19
Subject: [ADMIN] mysql to pgsql


> I'm trying to make the switch from mysql to pgsql, but I'm having trouble
> figuring out how to transfer my databases over!  I tried doing a dump in
> mysql and then importing that into pgsql, but I got *tons* of errors.. I
> searched the list archives and docs, but I haven't found anything that
> talks about this..
>
> Does anyone know how I can move my databases over?
>
> Thanks,
> --Bob
>
>
> ************





view thread (4+ messages)  latest in thread

Message-ID: <000e01bf79f1$dee08ac0$ce2a18c3@skillbrokers.bg>
Permalink:  ../000e01bf79f1$dee08ac0$ce2a18c3@skillbrokers.bg/
Also on:    postgresql.org/message-id/000e01bf79f1$dee08ac0$ce2a18c3@skillbrokers.bg

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: nmmm@nmmm.nu, bob@helpermonkey.org
  Subject: Re: [ADMIN] mysql to pgsql
  In-Reply-To: <000e01bf79f1$dee08ac0$ce2a18c3@skillbrokers.bg>
  References: <Pine.BSO.4.21.0002171317340.24496-100000@helpermonkey.org> <000e01bf79f1$dee08ac0$ce2a18c3@skillbrokers.bg>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox