On Sat, Feb 19, 2011 at 5:03 AM, andrew1 <andr...@mytrashmail.com> wrote: > hi all, I need to load mysql dump to postgre 8.3 . Is there a script to do > that? I hoped to use my2pg.pl , but couldn't find it. > It looks like it's not a part of /contrib in debian lenny. > what shoud I use for 8.3? > > thanks. > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general >
This question may have been asked several times and received good solutions in this mailing list, A search on this list may give you the solution you need. I recall there is no one click/quick solution to this migration as some objects may need rewriting and so on. That said, I recall one of probable solutions would be to take a DDL SQL dump of mySQL database objects then use a good editor to find and replace characters that may not be found desirable by PostgreSQL. Then take another SQL dump this time use the necessary switches to output to the dump file data only in CSV or other simple format excluding mysql specific statements. Then again you may need to run you editor (hopefully sed) to find and replace or transform characters and/or strings that may not be accepted by PostgreSQL. You may want to start by outputting small table(s) first and see and learn from the exercise. Always redirect standard output and standard error to file during the imports so as to have a easier time debugging the migration and ensure all is well. Allan. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general