MySQL Integration Topics

There are times when you simply need to move data from PostgreSQL to MySQL. Here is an example:

pg_dump --data-only --column-inserts -U adempiere -d idempiere -t chuboe_marketing_zml_t > /tmp/chuboe_marketing_zml_t.sql

 sed -i 's/\//g' /tmp/chuboe_marketing_zml_t.sql

 cat  /tmp/chuboe_marketing_zml_t.sql  | grep 'INSERT INTO' | sed 's/adempiere.//g'  > /tmp/chuboe_marketing_zml_t1.sql

 mysql -h 74.81.97.152 -u zml -p 'SOMEPASSWORD' -D wordpress  -e 'truncate table chuboe_marketing_zml_t'

 mysql -h 74.81.97.152 -u zml -p 'SOMEPASSWORD' -D wordpress < /tmp/chuboe_marketing_zml_t1.sql

 rm /tmp/chuboe_marketing_zml_t1.sql /tmp/chuboe_marketing_zml_t.sql

Other Options and References