r/mysql • • Nov 01 '25

solved Migrate from MySQL To PostgreSQL In Five Steps

There was a post earlier about porting from MySQL to PostgreSQL. This guide shows you how to do just that with DBeaver.
https://davesmysqlstuff.blogspot.com/2025/11/migrating-from-mysql-to-postgresql-in.html

And yes, you can do it in four steps with DBeaver, but I opted for a simpler example to provide a clearer illustration.

0 Upvotes

15 comments sorted by

2

u/KornikEV Nov 02 '25

How does it handle foreign key dependencies? Functions? Triggers? Views?

1

u/justintxdave Nov 03 '25

Most of those you will need to do after the migration. I will have to test, but the views should be transferred.

1

u/justintxdave Nov 04 '25

Views will be ported if you select them at the same time as you select the desired tables

1

u/Frosty-Bid-8735 Nov 03 '25

Why would you migrate from MySQL to Postgres?

2

u/autra1 Nov 03 '25

Better support for standard, extensions, postgis to name only a few on top of my head.

→ More replies (5)

2

u/KornikEV Nov 03 '25

Job security. Transitioning your app will get you employed for a long time ;)

1

u/Frosty-Bid-8735 Nov 03 '25

That, I agree.

0

u/[deleted] Nov 18 '25

[deleted] — view deleted comment

1

u/Data-Sleek Nov 18 '25

I would not use a UUID as a Primary Key on Mysql, because PK on Mysql are physically ordered on disk. I don't know about Postgres. UUIDs as PK (at least on MySQL) are prone to index fragmentation.

0

u/[deleted] Nov 19 '25

[deleted] — view deleted comment

1

u/datasleek Nov 19 '25

I’m not sure I understand your logic here. A int uses 4 bytes, unsigned that’s 2 billion records, more than enough. You’re telling me that 32 bytes as a PK is better than 4? On the MySQL side,PK incremental values are very fast, not so much with UUId. And making a Pk from multiple columns is a road for disaster, except for associative tables.

1

u/slotix Apr 06 '26

“Five steps” usually works fine until you include things like foreign keys, triggers, functions, and actual application behavior.

At that point it quickly turns into:

  1. move data
  2. fix constraints
  3. rewrite logic
  4. discover hidden assumptions
  5. repeat until it stops breaking 😄

Tools like DBeaver are great for schema/data transfer, but most of the real work starts right after that.