Markus
Markus

Reputation: 171

Convert MySql to PostgreSQL

I want to move from MySQL to PostgreSQL, this is not a live site as yet, going to launch soon and the schema is all ready in MySQL but given the business model I want a better scalable DB, so to convert MySQL to PostgreSQL, do i need to do it manually table by table or are there are GUI tools I can use (or scripts) to automate this conversion for tables/file values?

My app is written in codeingiter PHP.

Upvotes: 9

Views: 6195

Answers (3)

Reinderien
Reinderien

Reputation: 15308

  1. I agree with Pekka: if you're going to launch soon, the last thing you want to do is switch database systems.
  2. If you're lucky and you're able to export compliant SQL from your current database, Postgres will understand it and little to no extra effort is needed. SQL can be exported to recreate both the structure of your database and the content of its tables.

Upvotes: 2

Aleksandar Pavić
Aleksandar Pavić

Reputation: 3440

The only thing did the job for me was Navicat Premium, You can grab Navicat and use it free for 14 days, which is enough for DB migration...

Just create 2 connections (one source mysql, another target postgresql), and choose Tools -> Data Transfer, and it works!

Other tools I tried: dumping with mysqldump as postgresql compatible - didn't work, as ansi sql - didn't work, tried pgload - didn't work, tried with https://github.com/AnatolyUss/nmig Nmig created tables properly but data was missing.

Upvotes: 9

Joshua Martell
Joshua Martell

Reputation: 7212

MySQL is a highly scalable database used by some of the largest and most active sites on the interwebs. I'd have some really good testing benchmarks showing Postgres is going to give you a significant advantage before switching over.

Upvotes: -3

Related Questions