Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

MySQL vs PostgreSQL: Licences, Features and Which to Pick

Pick PostgreSQL when you want a fully open, community-run database with deep extension support, JSON tools and custom data types, and pick MySQL when you want the familiar relational database that Oracle develops and supports, with paid editions and a managed cloud service from the same company. Both are free to download. The big practical difference is the licence: PostgreSQL uses a liberal licence similar to BSD or MIT, while MySQL uses the GPL, and Oracle sells a commercial licence if you need to embed it in a product you sell.

Developers argue about this pair endlessly, so I went to the source instead of the forums. I read the PostgreSQL about, licence and versioning pages and the MySQL 8.4 reference manual, Community Edition and product pages, and here's what each project says about itself.

PostgreSQL and MySQL side by side

PostgreSQLMySQL
Who's behind itThe PostgreSQL Global Development GroupOracle Corporation develops, distributes and supports it
LicencePostgreSQL License, similar to BSD or MITGPL, with a commercial licence on sale
TypeObject-relational databaseRelational database
Free optionThe whole project is free and open sourceCommunity Edition, freely downloadable
Paid layerSupport and hosting from third partiesEnterprise, Standard and Classic editions plus HeatWave
Release rhythmOne major version about once a year, each supported for 5 yearsNot set out on the pages I read
OriginsPOSTGRES project at the University of California, Berkeley, in 1986Described in its manual as the most popular open source SQL database

The licence detail that matters if you build software to sell

This is the part most quick comparisons skip. The MySQL manual says plainly that MySQL uses the GPL to define what you can and can't do, and that if you feel uncomfortable with the GPL or need to embed MySQL code in a commercial application, you can buy a commercially licensed version from Oracle. PostgreSQL's licence page describes its own licence as a liberal open source licence, similar to the BSD or MIT licences, which places far fewer conditions on how you ship it.

For a business running its own website or app on a server, either licence is usually fine. It's software companies that bundle the database inside a product they distribute who need to read the terms carefully, and that's where PostgreSQL's simpler licence often settles the debate.

Where PostgreSQL pulls ahead on features

PostgreSQL's about page reads like a feature catalogue. It has been ACID compliant since 2001, it supports JSON and JSONB documents, XML, key-value storage through hstore, arrays, ranges and UUIDs, and it lets you define your own data types and functions. You can write stored procedures in PL/pgSQL, Perl, Python or Tcl, with more languages available through extensions, and foreign data wrappers let it query other databases through standard SQL. Add the popular PostGIS extension and it handles geospatial data too.

If your data is documents rather than tables, our MongoDB vs PostgreSQL guide is worth a look.

Where MySQL makes life simple

MySQL's strength is its familiarity and its single owner. The manual describes a multithreaded client and server system with a wide range of client libraries and tools, and it can also run as an embedded library inside an application. Oracle offers a clear upgrade path from the free Community Edition, which includes SQL and NoSQL features, to Enterprise Edition, a cluster edition and MySQL HeatWave, a cloud service that combines transactions with analytics and machine learning.

MySQL also has a close cousin, and our MariaDB vs MySQL guide explains the differences.

How to choose in five questions

  1. Will you embed the database inside software you sell? Read the MySQL GPL terms first, or choose PostgreSQL.
  2. Do you need geospatial data, custom types or heavy JSON queries? PostgreSQL's extensions cover those well.
  3. Does your hosting provider or app framework assume MySQL? Going with the default saves setup time.
  4. Do you want one vendor to call for support and a managed cloud? MySQL's Oracle editions give you that.
  5. How long will the system run untouched? PostgreSQL publishes a five-year support window for each major version.

If you're weighing the bigger picture first, my piece on why choosing a good database matters for your business is a good starting point, and these ChatGPT prompts for SQL help whichever one you pick.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

My advice on MySQL or PostgreSQL

For a new project with no legacy constraints, I'd start with PostgreSQL. Its licence is simpler, its feature set is wide, and its release and support schedule is published in plain terms. Choose MySQL when your platform, hosting or team already runs on it, or when you want Oracle's editions and HeatWave service behind you. Neither choice is a mistake for a small business website or app; the mistake is switching halfway through, so decide based on the tools you already use.

Do you make database tools? Tool makers can ask to be considered for a featured place in comparisons like this one.

Frequently asked questions

Is PostgreSQL free for commercial use?

Yes. PostgreSQL is released under the PostgreSQL License, a liberal open source licence that its project describes as similar to the BSD or MIT licences.

Is MySQL free?

MySQL Community Edition is freely downloadable under the GPL. Oracle sells Enterprise, Standard and Classic editions, and a commercial licence for embedding MySQL in commercial applications.

Who owns MySQL?

The MySQL reference manual says MySQL is developed, distributed and supported by Oracle Corporation.

Which version of PostgreSQL is current?

The PostgreSQL documentation lists version 18 as current, with versions 14 to 18 supported. Each major version is supported for five years after its first release.

Does PostgreSQL support JSON?

Yes. PostgreSQL lists JSON and JSONB data types, SQL/JSON constructors, path expressions and JSON_TABLE among its features.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.