Databases and storage · Comparison

PostgreSQL vs MySQL

The two most popular open-source relational databases. Either will run a typical web app well; the differences show up at the edges.

2 options · 7 questions side by side · updated

ComparePostgreSQLMySQL
FeaturesVery rich: JSONB, arrays, extensionsSolid core, fewer advanced features
StrictnessStrict about data by defaultStricter now, looser historically
ExtensionsPostGIS, pgvector, pg_cron and moreFew; features arrive with new versions
Row-level permissionsRow level security built inNot built in
HostingEvery cloud, Supabase, NeonEvery cloud, shared hosts, PlanetScale
Home turfModern JavaScript and Python stacksWordPress, PHP and Laravel
LicencePostgreSQL licence (permissive)GPL, owned by Oracle

How to choose between PostgreSQL and MySQL

  • Pick PostgreSQL for new projects that may need JSON, geography, vector search or row-level rules.
  • Pick MySQL (or MariaDB) for WordPress and PHP stacks, or when your host offers nothing else.

The options

More comparisons

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.