Migrating from MySQL to PostgreSQL
March 5th, 2009 by Anthony Curreri
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:\shares\postgres.sql”
If you found this helpful, help me by checking out the ads on the right. Thank you!
Link to this post! Copy and paste this code into your blog or website:
<a href="http://www.mailbeyond.com/migrating-from-mysql-to-postgresql"> Migrating from MySQL to PostgreSQL </a>
