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 --single-transaction— consistent snapshot without locking your tables--no-tablespaces— avoids a permissions error on managed/cloud MySQL- You'll be prompted for the password; the file lands in the current folder
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
- Access denied for PROCESS/tablespaces — add
--no-tablespaces(already in the commands above). - Huge file — gzip it; if it is still over the limit, you can exclude big log tables with
--ignore-table=mydatabase.logs. - Only schema needed? — add
--no-datato convert just the structure.
Got your file? Convert it to PostgreSQL now →