Re: mysql to pgsql

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



K. Suresh wrote:
Hello,

I have a database application with Java and PHP clients. I used mysql
with 64 tables. Now, we have decided to use pgsql. Please suggest the
migration procedure.

Thanks.

Suresh


Hi all,
for a few weeks i had the same problem. I found the attached script, doc is online :
http://ns2.ziet.zhitomir.ua/~fonin/projects/my2pg/my2pg_man.html

shortcut :
mysqldump -u username --password=mypasswd databasetodump [tables] |(pipe) my2pg.pl>dumpfile dumpfile the script that you can use to create tables in an already existing PG-dbase. If you need functions in PG (e.g. you need enum in mysql) you have to read the file as PG-superuser and not as owner of the db. The my2pg.pl script creates Makefile and three libtypes.*. You need a specific pg-libary on your system, but i've forgotten the name. If you convert as superuser, don't forget to give the privs to the user (grant all on 'tablename' to 'user). do the same for *_seq-tables.
hope it helps
Gerd
--
--------------------------------------------------------
# Gerd Terlutter        | Mueller+Blanck Software GmbH #
# gerd@xxxxxxxxx        | Gutenbergring 38             #
# gerd.terlutter@xxxxxx | D-22848 Noderstedt           #
# tel:0171/6992579      | tel:+49 40 500 171-1         #
# Buero:040/500171-17   | fax:+49 40 500 171-71        #
--------------------------------------------------------

Attachment: my2pg.pl
Description: Perl program


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux