SwapSQL

MySQL → PostgreSQL

Convert MySQL BLOB to PostgreSQL bytea

Binary data maps from MySQL's BLOB family to PostgreSQL's single bytea type. Content is preserved byte-for-byte.

BLOB / VARBINARY bytea

What to know

Before / after

MySQL

CREATE TABLE files (
  data LONGBLOB
);

PostgreSQL

CREATE TABLE files (
  data bytea
);

Don't convert column-by-column — convert the whole database.

Upload a dump, get back ready-to-import SQL with this mapping (and every other one) applied.

Open the MySQL → PostgreSQL converter

See the full type mapping table or all guides.