Re: [ADMIN] mysql to pgsql

Поиск
Список
Период
Сортировка
От Nikolay Mijaylov
Тема Re: [ADMIN] mysql to pgsql
Дата
Msg-id 000e01bf79f1$dee08ac0$ce2a18c3@skillbrokers.bg
обсуждение исходный текст
Ответ на mysql to pgsql  (Bob Zoller <bob@helpermonkey.org>)
Ответы Re: [ADMIN] mysql to pgsql
Список pgsql-admin
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
>
>
> ************



В списке pgsql-admin по дате отправления:

Предыдущее
От: "SAI SIU"
Дата:
Сообщение: Initdb problem in red Hat 6.0
Следующее
От: Sameer Anja
Дата:
Сообщение: Backend error with postgres 6.5.3 on redhat 6.1