Migrating from MySQL to PostgreSQL

First, create the tables in your new Postgres database. I used a program called Navicat. You should create the tables by hand because the field types are different in MySQL and Postgres.

Use the following command to get mysqldump to create a dump file of the database that you can upload. You can also use Navicat to run the script.

mysqldump databasename tablename -v --compatible=ansi,postgresql --complete-insert=TRUE --extended-insert=FALSE --compact --default-character-set=UTF8 -u username -p -r "c:sharespostgres.sql"

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.