Convert mysql dump file to postgresql script.
go get github.com/dtcv/mysql2postgresql
- use mysqldump to dump database from mysql:
mysqldump --compatible=postgresql --default-character-set=utf8 --hex-blob -r databasename.mysql -u root databasename
- convert the dump file to postgresql script:
mysql2postgresql -i databasename.mysql -o databasename.sql
- use the script with psql:
\i databasename.sql