SwapSQL

How to export a MySQL dump

A "dump" is a single .sql file containing your schema and data. You need one to convert MySQL to PostgreSQL. Here is the fastest way to get it.

Standard export

mysqldump --single-transaction --no-tablespaces \
  -h localhost -u root -p mydatabase > dump.sql

Compress it (recommended)

gzip dump.sql        # produces dump.sql.gz (~10× smaller)

Our converter accepts .sql.gz directly — smaller uploads, faster conversions.

MySQL running in Docker

docker exec CONTAINER_NAME mysqldump \
  --single-transaction -u root -pPASSWORD mydatabase > dump.sql

Remote server (cPanel, VPS, cloud)

mysqldump --single-transaction --no-tablespaces \
  -h db.example.com -P 3306 -u myuser -p mydatabase > dump.sql

On shared hosting without SSH, use phpMyAdmin: select the database → Export → method "Quick", format "SQL" → Go. That file works here too.

Common pitfalls

Got your file? Convert it to PostgreSQL now →