SwapSQL

PostgreSQL → MySQL

Convert PostgreSQL bytea to MySQL

Binary columns translate to LONGBLOB, the size-safe choice. The bytes are identical; only the literal syntax differs between the engines.

bytea LONGBLOB

What to know

Before / after

PostgreSQL

raw bytea
-- value: \x48656c6c6f

MySQL

raw LONGBLOB
-- value: 0x48656C6C6F

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 PostgreSQL → MySQL converter

See the full type mapping table or all guides.