MySQL is open source — and that single fact is the root of most MySQL licensing confusion. The same database is available as the freely usable Community Edition under the GPL and as a commercial Enterprise Edition under an Oracle subscription. Choosing between them is rarely about the database engine itself; it is about support, specific enterprise features, and — critically — whether you embed or distribute MySQL inside a product you ship to others. For the wider Oracle picture, see our complete Oracle licensing guide.
Community Edition versus Enterprise Edition
MySQL Community Edition is licensed under the GPL v2 and can be used at no licence cost, including in production. MySQL Enterprise Edition is a commercial Oracle subscription that bundles Oracle support together with proprietary add-ons — capabilities such as enterprise authentication, transparent data encryption, auditing, monitoring, backup, and the firewall/security tooling — that are not part of the Community build. The honest way to frame the choice is: Community for the open-source engine with community support and self-managed operations; Enterprise when you need Oracle support and the proprietary security, backup, and monitoring features.
| Dimension | Community Edition (GPL) | Enterprise Edition (subscription) |
|---|---|---|
| Licence cost | None | Annual Oracle subscription |
| Support | Community / self-managed | Oracle commercial support |
| Enterprise security, backup, monitoring add-ons | Not included | Included |
| Embedding in a product you distribute | GPL obligations apply (copyleft) | Commercial/OEM terms avoid GPL copyleft |
The GPL and the copyleft question
For internal use, Community Edition's GPL licence is straightforward and free. The complication arises when you distribute software that includes MySQL — shipping an appliance, an on-premises product, or any package a customer installs. The GPL is a copyleft licence, which can create obligations to make your own combined work available under compatible terms. Organisations that do not want those obligations on their proprietary product typically take a commercial/OEM licence from Oracle precisely to avoid the GPL's copyleft reach. This is the classic MySQL "embedding" decision.
When embedding drives a commercial licence
If MySQL is an internal back-end that never leaves your organisation, Community Edition is generally the simplest path. If MySQL is bundled into something you sell or distribute, the question becomes whether the GPL obligations are acceptable for that product; where they are not, an Oracle commercial or OEM/ISV licence is the route that keeps your proprietary code proprietary. The decision should be made with the distribution model — internal versus shipped — front and centre, because it, not feature preference, is what determines whether a paid licence is required.
Buyer takeaway: Internal production use of MySQL Community Edition is free under the GPL. The commercial licence becomes relevant for two reasons: you need Oracle's enterprise features and support, or you distribute MySQL inside a product and want to avoid GPL copyleft obligations. Separate those two drivers cleanly before buying. For guidance on the embedding decision, see our Oracle licensing experts and the Oracle vendor hub.
A two-question MySQL checklist
Two questions resolve most MySQL licensing decisions. First: do you distribute or embed MySQL in software others install, or is it purely internal? Second: do you require Oracle's enterprise security, backup, and monitoring features or formal support? If both answers are "no," Community Edition is typically sufficient. A "yes" to either points toward Enterprise or a commercial/OEM licence, and the distribution question in particular should be reviewed deliberately rather than assumed.
MySQL in the cloud and managed services
Cloud changes the MySQL licensing conversation again. Managed MySQL services — including Oracle's own MySQL HeatWave on OCI and the MySQL-compatible managed databases offered by other cloud providers — fold the licensing and support into a consumption price, so there is no separate Community-versus-Enterprise decision to make for those services. The decision re-emerges only when you self-manage MySQL on cloud compute, where you again choose between the free Community build and an Enterprise subscription based on feature and support needs. The distribution/embedding question, by contrast, is generally not triggered by internal cloud-hosted use, because you are not shipping the database to a third party.
Common questions
Can I use MySQL Community Edition in production for free?
Yes. Internal production use of the GPL-licensed Community Edition carries no licence fee. The cost questions arise only if you need Enterprise features and support, or if you distribute MySQL inside a product you ship.
Does using MySQL behind a website count as distribution?
Running MySQL to power a service you host yourself is generally internal use, not distribution, because users interact with your service rather than receiving the database software. Distribution obligations centre on shipping MySQL inside software others install.