Saturday, December 13, 2014

Import Mysql Dump into PostgreSQL Ubuntu

First, you must dump mysql with command below
mysqldump --compatible=postgresql --default-character-set=utf8 -r nama_file.sql -u root -p db_name
 If you don't need mysql password, please remove "-p"

After that, you need to convert sql into psql. You can go github repository here.

After you get psql format, than you can import with
psql -U postgres -h localhost -d database_name -f nama_file.psql

0 comments:

Post a Comment