Обсуждение: Mysql migration to Postgresql
Hello, Currently, we are using Mysql: we would like to change. Now, we would like to use Postgresql. Only problem is that most of our customer addresses and other information are on Mysql. Can you help us with this? Thank you. -- View this message in context: http://old.nabble.com/Mysql-migration-to-Postgresql-tp26513373p26513373.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
this was a very general question. you can use any ETL / script to transfer data from mysql to postgres. for me, sometimes, the following path works: 1. first try to dump the mysql database SQL schema in ANSI-conformant format (consult mysql support how to do it). import this into fresh postgres dataabase. 2. if 1 works, then dump data from mysql using INSERT statements (consult mysql support how to do it), and run these in postgres. you can ask here if you have any postgres specific problems/questions. 2009/11/25 mrciken <mik.wen@yahoo.com>: > > Hello, > > Currently, we are using Mysql: we would like to change. Now, we would like > to use Postgresql. Only problem is that most of our customer addresses and > other information are on Mysql. > Can you help us with this? > > Thank you. > > -- > View this message in context: http://old.nabble.com/Mysql-migration-to-Postgresql-tp26513373p26513373.html > Sent from the PostgreSQL - general mailing list archive at Nabble.com. > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Filip Rembiałkowski JID,mailto:filip.rembialkowski@gmail.com http://filip.rembialkowski.net/
mrciken wrote: > Hello, > > Currently, we are using Mysql: we would like to change. Now, we would like > to use Postgresql. Only problem is that most of our customer addresses and > other information are on Mysql. > Can you help us with this? There are a few options available to you. This has been extensively discussed in the archives, which are indexed by Google, so you can find a lot out with a few Google searches. One of the first hits is: http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL In my opinion, the best option is usually to write a new set of SQL scripts to create the required tables etc in PostgreSQL, using the same table and column names etc as your existing MySQL database and adapting types as appropriate. That will ensure you get a fairly clean, sane setup in PostgreSQL and also helps make sure you understand the database you're working with. Once you've run the SQL scripts you wrote to create the required (empty) tables in the new PostgreSQL database, import just the data from MySQL into the waiting tables in PostgreSQL. You can do the data import by loading an SQL dump created in MySQL using "psql" (though some fixing and conversion may be required), using a script or database access program connected to both databases at once, or however else you like. Doing things this way will let you write a good quality table structure for PostgreSQL, ensuring that things are done sensibly and handling issues like converting from AUTO_INCREMENT to sequences properly, converting any use of full text search, etc. However, you'll want to read the documentation thoroughly. Another option is to use one of the automated conversion tools and see how you go. You can always refine the schema it creates once the conversion is done. Personally, I've never been happy with the results of doing things that way, though. -- Craig Ringer
As said by Filip Rembiałkowski-3, you could try using some software that will help you in managing the transfer. I can recommend the use of data integration software such as Datastage (It is a licensed program) or Talend Open Studio (Talend is open source). Tell us how it went. mrciken wrote: > > Hello, > > Currently, we are using Mysql: we would like to change. Now, we would like > to use Postgresql. Only problem is that most of our customer addresses and > other information are on Mysql. > Can you help us with this? > > Thank you. > > -- View this message in context: http://old.nabble.com/Mysql-migration-to-Postgresql-tp26513373p26544102.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.