How MySQL's dual licensing model works (GPL vs commercial), edition comparison and pricing, cloud and container deployment rules, virtualisation impact, non-production requirements, compliance risks and Oracle audit exposure, and the cost optimisation framework that balances risk and spend.
This guide is part of the MySQL Licensing pillar. See also: MySQL Licence Models Explained · What Is HeatWave SQL and How Is It Licensed? · Oracle Licensing Overview Guide
MySQL is the world's most widely deployed open-source database, owned by Oracle Corporation since 2010. Its dual licensing model creates a uniquely complex compliance landscape for enterprise IT.
Organisations can run MySQL at zero cost for internal workloads under the GPL. But they face commercial licensing requirements when embedding MySQL in distributed proprietary software, when they need Oracle's enterprise features and support, or when GPL compliance is impractical.
The free open-source path runs under the GNU General Public License (GPL). The paid path runs under commercial subscriptions from Oracle. Understanding which path applies to each deployment is the foundation of MySQL cost management. For MySQL licence model details, see MySQL Licence Models Explained.
| Dimension | MySQL Community (GPL) | MySQL Commercial (Subscription) | Key Decision Factor |
|---|---|---|---|
| Licence cost | $0. Free to use. | $2,000 to $10,000+ per server per year. | Commercial only needed for embedding in proprietary software or enterprise support requirements. |
| Source code obligation | GPL copyleft. If you distribute MySQL with your product, your product must also be GPL-licensed. | No GPL obligation. Use MySQL in proprietary/closed-source products freely. | Distribution of proprietary software with MySQL requires commercial licence. |
| Internal use | Fully permitted. No source code disclosure for purely internal deployments. | Fully permitted. | Internal-only use can always use Community at $0. |
| Oracle support | No Oracle support. Community forums and self-support only. | 24x7 Oracle support included with commercial subscription. | Mission-critical systems may require vendor support SLAs. |
| Enterprise features | Community Edition only. No enterprise security, backup, monitoring, or audit plugins. | Full enterprise features: encryption, audit, backup, Thread Pool, Query Analyzer, Firewall. | Enterprise Edition features add significant operational value for large deployments. |
| Oracle audit exposure | No Oracle audit rights over GPL usage. | Oracle can audit commercial licence compliance under subscription terms. | Commercial users must track and document server counts accurately. |
Oracle offers four distinct MySQL editions plus an OEM/embedded licensing option. Selecting the right edition is the foundation of MySQL cost management. For Oracle's broader database licensing models, see Six Oracle Database Licensing Models and Costs.
| Edition | Licence Type | Approx. Annual Cost | Key Features Included | Best For |
|---|---|---|---|---|
| Community Edition | GPL (open source) | $0 | Core MySQL database engine. InnoDB storage engine. Replication. Partitioning. Performance schema. MySQL Shell. | Internal applications. Development/test. Non-critical workloads. Open-source projects. |
| Standard Edition | Commercial subscription | ~$2,000/server/year | Community features + MySQL Router + 24x7 Oracle support + updates/patches. | Production workloads needing vendor support but not enterprise features. |
| Enterprise Edition | Commercial subscription | ~$5,000/server/year | Standard features + Enterprise Backup (hot backup) + Thread Pool + Enterprise Firewall + Enterprise Audit + Enterprise Encryption (TDE) + Enterprise Monitor + Query Analyzer + Enterprise Authentication (LDAP/PAM/Kerberos). | Mission-critical systems. Regulated industries. Large-scale deployments. |
| Cluster CGE | Commercial subscription | ~$10,000/server/year | Enterprise features + NDB Cluster storage engine (in-memory distributed clustering) + MySQL Cluster Manager + geographic replication. | Telecom-grade high availability. Ultra-low-latency requirements. Real-time data access. |
| OEM/Embedded | Commercial agreement | Negotiated per deal | Right to embed and redistribute MySQL in proprietary software without GPL obligations. | ISVs and OEMs distributing MySQL within their products to end customers. |
For Oracle's HeatWave in-memory query accelerator for MySQL, see What Is HeatWave SQL and How Is It Licensed?
MySQL commercial licences are priced per server per year, with pricing tiers based on the physical or virtual server's socket count. Understanding the pricing mechanics prevents surprises at renewal. For Oracle's core factor approach to database licensing, see Oracle Processor Core Factor Table and Licence Calculator.
| Server Size | Standard /Year | Enterprise /Year | Cluster CGE /Year | Cost Driver |
|---|---|---|---|---|
| 1 to 4 sockets | ~$2,000 | ~$5,000 | ~$10,000 | Most common tier. Covers typical enterprise servers. |
| 5 to 8 sockets | ~$4,000 | ~$10,000 | ~$20,000 | Large servers double the subscription cost. |
| 8+ sockets | Contact Oracle | Contact Oracle | Contact Oracle | Very large servers. Custom pricing required. |
| Scenario | Servers | Edition | Annual Cost | 3-Year Total | Alternative |
|---|---|---|---|---|---|
| Small internal app | 2 (1 prod + 1 dev) | Community (GPL) | $0 | $0 | No commercial licence needed for internal use. |
| Medium production | 5 (3 prod + 2 dev/test) | Standard | $10,000 | $30,000 | Consider Community + third-party support (~$5K/year). |
| Large mission-critical | 15 (10 prod + 5 non-prod) | Enterprise | $75,000 | $225,000 | Evaluate which servers truly need Enterprise vs Standard. |
| ISV embedding in SaaS | 50 customer instances | Enterprise or OEM | $250,000+ (or OEM deal) | $750,000+ | OEM agreement may reduce per-instance cost significantly. |
For Oracle contract negotiation, see Oracle Contract Negotiation Service.
The GNU General Public License (GPL v2) governs MySQL Community Edition. Understanding exactly when GPL obligations trigger and when they do not is essential for avoiding unintentional compliance failures. For the broader Oracle licensing framework, see the Oracle Licensing Overview Guide.
| Usage Scenario | GPL Triggered? | Source Disclosure? | Commercial Licence? | Explanation |
|---|---|---|---|---|
| Internal enterprise app using MySQL Community as backend | No | No | No. Internal use does not constitute distribution under GPL. | The most common enterprise scenario. Completely free. |
| SaaS app with MySQL Community as backend | No | No | No. SaaS delivery is not distribution of MySQL itself. | GPL applies to distribution of software copies, not network access. |
| Open-source product including MySQL, released under GPL | Yes, but satisfied automatically | Yes, already provided | No. GPL-compatible distribution. | Your product's GPL licence satisfies MySQL's GPL requirement. |
| Proprietary software distributed with MySQL Community bundled | Yes. GPL copyleft triggered. | Yes. Entire product must be GPL or buy commercial. | Yes. Required to avoid GPL copyleft. | Primary trigger for MySQL commercial licensing. |
| Hardware appliance shipped with MySQL Community embedded | Yes | Yes | Yes. OEM/embedded licence required. | Physical distribution triggers GPL distribution rules. |
| Proprietary software connecting to MySQL via network only | Debated. Oracle's position is conservative. | Potentially. Depends on linking interpretation. | Consider commercial licence for risk mitigation. | Grey area. MySQL FOSS Exception and Oracle's interpretation create uncertainty. |
The critical distinction: Internal use and SaaS delivery do not trigger GPL distribution obligations. The GPL copyleft is triggered only when you distribute MySQL as part of another product. If you never ship MySQL binaries to a customer, you never trigger the copyleft. If you do ship binaries, your product must be GPL or you must buy a commercial licence.
Cloud-managed MySQL services have simplified licensing for many enterprises. But self-hosted MySQL in the cloud still requires careful attention. For Oracle cloud database licensing, see Oracle Autonomous Database Licensing in the Cloud.
| Cloud Model | Separate Oracle Licence? | Cost Structure | Key Considerations |
|---|---|---|---|
| AWS RDS for MySQL | No. AWS handles licensing. | AWS hourly/reserved instance pricing (Community under the hood). | No Enterprise features. AWS provides operational support. |
| Azure Database for MySQL | No. Microsoft handles licensing. | Azure pricing tiers (Flexible Server). | Community Edition. Azure provides backups, HA, monitoring. |
| Google Cloud SQL for MySQL | No. Google handles licensing. | GCP pricing per vCPU/RAM/storage. | Community Edition. Google provides managed operations. |
| Oracle MySQL HeatWave (OCI) | No. Included in OCI service pricing. | OCI consumption-based pricing. | Includes Enterprise features + HeatWave in-memory acceleration. Oracle's own managed service. |
| Self-hosted MySQL Enterprise on cloud VM | Yes. Full commercial subscription per VM. | Oracle subscription ($5K/server/year) + cloud infrastructure costs. | Each VM running MySQL Enterprise counts as a separate server requiring licence. |
| Self-hosted MySQL Community on cloud VM | No. GPL Community Edition is free everywhere. | Cloud infrastructure costs only. | No Oracle support. Need self-support or third-party support plan. |
Cloud licensing shortcut: If you use a cloud provider's managed MySQL service (RDS, Azure Database, Cloud SQL, HeatWave), you do not need any separate Oracle licence. The provider handles it. You only need an Oracle subscription when you self-host MySQL Enterprise on your own cloud VMs.
Containerised MySQL deployments create specific licensing challenges because each container instance running MySQL Enterprise requires its own subscription. For Oracle Docker and Kubernetes licensing rules, see Oracle Docker and Kubernetes Container Licensing. For virtualisation licensing, see Oracle Licensing in Virtualised Environments.
| Container Scenario | Licences Required | Annual Cost (Enterprise) | Risk |
|---|---|---|---|
| Single MySQL Community container in Docker | 0. GPL, no licence needed. | $0 | No Oracle compliance risk. But no Oracle support. |
| 10 MySQL Enterprise containers in Kubernetes | 10 server subscriptions. | $50,000 | Each container = separate server. Auto-scaling can create unlicensed instances. |
| Kubernetes auto-scaling from 5 to 20 pods | 20 server subscriptions (peak count). | $100,000 | Oracle may count peak concurrent instances. Scaling creates compliance gaps. |
| MySQL Community in K8s with Percona operator | 0 | $0 | Open-source alternative avoids all Oracle licensing. Percona provides enterprise features. |
| Ephemeral MySQL Enterprise containers for CI/CD | Each concurrent instance technically requires licence. | Varies by peak concurrent count. | Even short-lived instances count. Use Community for CI/CD. |
Container sprawl is the biggest hidden risk. Kubernetes auto-scaling can spin up MySQL Enterprise pods faster than procurement can track them. Oracle may count peak concurrent instances during an audit. Use MySQL Community for all containerised deployments unless there is a documented requirement for Enterprise features that cannot be met by Percona or MariaDB.
Every installed instance of MySQL commercial editions requires a subscription, regardless of environment purpose. For Oracle's general non-production licensing position, see the Oracle Licensing Overview Guide.
| Environment | MySQL Community | MySQL Enterprise | Recommended Approach |
|---|---|---|---|
| Production | Free. No licence needed. | Full subscription required. | Use Enterprise only for mission-critical production systems. |
| Development | Free. | Full subscription required. | Use Community for development. Functionally equivalent core engine. |
| Testing / QA | Free. | Full subscription required. | Use Community unless testing Enterprise-specific features. |
| Staging | Free. | Full subscription required. | Use Community where possible. Licence staging only if Enterprise features needed for validation. |
| Disaster Recovery | Free. | Full subscription required (active or passive). | Negotiate DR rights in commercial agreement. Otherwise licence fully. |
| Training / Sandbox | Free. | Full subscription required. | Always use Community for training. No reason to licence Enterprise. |
The core engine is identical. MySQL Community and MySQL Enterprise share the same database engine. The differences are the enterprise plugins (backup, audit, firewall, Thread Pool, monitor) and Oracle support. For any environment where you do not need those plugins or that support, Community is functionally equivalent and free.
MySQL licensing compliance failures can result in significant financial exposure. Oracle's audit rights apply to commercial MySQL subscribers and may identify GPL compliance issues in the broader estate. For Oracle audit defence, see Oracle Audit Defense Service. For common Oracle database compliance issues, see Top 25 Oracle Database Non-Compliance Reasons.
| Compliance Risk | What Happens | Financial Exposure | Prevention |
|---|---|---|---|
| Unlicensed MySQL Enterprise installations | Dev/test/staging servers running Enterprise Edition binaries without subscriptions. | $2,000 to $5,000 per server per year of non-compliance + backdated subscription fees. | Audit all MySQL instances. Verify edition via SELECT VERSION() and feature usage. Standardise Community for non-production. |
| GPL violation: proprietary software distributed with Community | Commercial product shipped with MySQL Community bundled without GPL compliance or commercial licence. | Oracle can enforce GPL or require commercial licensing for all distributed copies. | Identify all products that distribute MySQL. Obtain OEM/commercial licence or ensure GPL compliance. |
| Container/Kubernetes sprawl | Auto-scaling creates more MySQL Enterprise instances than licensed. | $5,000 per unlicensed container/pod per year. | Use Community for containers. Implement pod count limits. Track peak concurrent instances. |
| Enterprise features used on Community installation | Enterprise plugins installed on Community Edition server (Enterprise Backup, Audit, Firewall). | Oracle can claim commercial licence required for that server. | Verify no Enterprise plugins are present on Community installations. |
| Shadow MySQL installations | Developers install MySQL Enterprise from downloaded binaries without procurement knowledge. | Each untracked instance is a compliance gap. Cumulative exposure. | Implement software deployment controls. Scan for MySQL installations regularly. |
For Oracle licence audit preparation, see Oracle Licence Audit: 22 Secrets.
MySQL licensing costs are highly optimisable because the free Community Edition provides the same core database engine as the commercial editions. For Oracle licence management services, see Oracle License Management Services.
| Strategy | How It Works | Expected Savings | Trade-Off |
|---|---|---|---|
| Maximise Community Edition usage | Deploy Community for all internal apps, dev/test, and non-critical production workloads. | $2,000 to $5,000 per server per year eliminated. | No Oracle support. Need self-support plan or third-party support. |
| Right-size to Standard Edition | Use Standard ($2K/year) instead of Enterprise ($5K/year) for servers needing Oracle support but not Enterprise features. | $3,000 per server per year. 60% cost reduction. | No Enterprise Backup, Audit, Firewall, Thread Pool, or Monitor. |
| Consolidate MySQL workloads | Run multiple databases on fewer physical/virtual servers to reduce per-server licence count. | $2,000 to $5,000 per eliminated server per year. | Requires capacity planning. Potential performance impact. |
| Use cloud-managed MySQL | Migrate to AWS RDS, Azure Database for MySQL, or Oracle MySQL HeatWave. No separate Oracle licence. | Eliminates Oracle subscription entirely. Cloud pricing may be lower or higher depending on usage. | Vendor lock-in to cloud provider. Community features only (except HeatWave). |
| Evaluate MariaDB or Percona Server | MySQL-compatible open-source forks with enterprise features at lower or zero cost. | $2,000 to $5,000 per server per year eliminated. Percona support ~$2,500/year vs Oracle $5,000. | Migration effort. Minor compatibility differences. Different support organisation. |
| Negotiate volume discounts | Multi-year commitment, bundling with other Oracle products, or OEM agreement for large deployments. | 10 to 30% discount on MySQL subscriptions achievable. | Multi-year commitment reduces flexibility. |
Inventory all MySQL installations. Scan all servers, VMs, containers, and cloud instances for MySQL. Record edition (Community vs Enterprise), version, and server size. Complete visibility. No hidden or shadow MySQL deployments.
Verify edition for each instance. Run SELECT VERSION() and check for Enterprise-only plugins (enterprise_audit, enterprise_firewall, etc.). Confirm which instances are Community vs Enterprise. Foundation for compliance.
Map licences to installations. Verify every MySQL Enterprise instance has a valid, current Oracle subscription. No unlicensed Enterprise installations.
Identify GPL distribution risks. Review all software products distributed externally. Check if any include or embed MySQL Community binaries. No unintentional GPL violations from product distribution.
Right-size editions. Downgrade servers that do not need Enterprise features to Standard or Community. Use Community for all dev/test/training. Potentially 40 to 60% savings on non-critical servers.
Control container/Kubernetes licensing. Implement pod count limits for MySQL Enterprise. Use Community for CI/CD and ephemeral workloads. No container sprawl creating unlicensed instances.
Evaluate cloud-managed alternatives. Assess AWS RDS, Azure Database, or Oracle HeatWave as replacements for self-hosted commercial MySQL. Potential elimination of Oracle subscription costs.
Evaluate open-source alternatives. Assess MariaDB and Percona Server as MySQL-compatible replacements for commercial licences. Reduced Oracle dependency. Potential 50 to 100% cost reduction.
Negotiate Oracle MySQL terms proactively. Request volume discounts, multi-year pricing, and dev/test/DR rights at renewal. 10 to 30% subscription cost reduction through negotiation.
Implement deployment governance. Require procurement approval before installing MySQL Enterprise. Standardise Community for non-production. Prevention of compliance gaps. Proactive rather than reactive.
For expert MySQL and Oracle database licensing guidance, Redress Compliance provides independent advisory through our Oracle License Management Services, Oracle Audit Defense Service, and Oracle Contract Negotiation Service.
MySQL Community Edition is completely free for enterprise use, including production deployments. The GPL licence imposes no fees for internal use. You only need a commercial licence if you distribute MySQL as part of a proprietary product or need Oracle's enterprise features and support.
A commercial licence is required when you embed MySQL in proprietary software distributed to customers (to avoid GPL copyleft), when you need Oracle's 24x7 support and SLAs, or when you require Enterprise Edition features like hot backup, audit, encryption, firewall, and Thread Pool.
The core database engine is identical. Enterprise Edition adds enterprise-only features (Enterprise Backup, Audit, Firewall, Thread Pool, Monitor, Query Analyzer, LDAP/Kerberos authentication, TDE encryption) plus 24x7 Oracle support. Community Edition relies on self-support and community forums.
MySQL Enterprise Edition costs approximately $5,000 per server per year for servers with 1 to 4 CPU sockets. Larger servers (5 to 8 sockets) cost approximately $10,000 per year. These are list prices. Negotiated discounts of 10 to 30% are achievable for volume purchases or multi-year commitments.
No. MySQL commercial licences are per server, not per user. A single server subscription covers unlimited users connecting to that MySQL instance. The cost driver is the number of servers and their socket count.
If you use MySQL Enterprise Edition on dev/test servers, yes. Each server requires a subscription. However, MySQL Community Edition can be used for free on dev/test servers with no licence required. Since the core engine is the same, Community is the recommended choice for non-production.
Each container or Kubernetes pod running MySQL Enterprise Edition technically requires its own server subscription. Auto-scaling creates compliance risk if pods scale beyond licensed count. MySQL Community Edition in containers is free. Use Community for containerised deployments to avoid escalating licence costs.
Cloud-managed services (AWS RDS, Azure Database for MySQL, Google Cloud SQL, Oracle MySQL HeatWave) include licensing. No separate Oracle subscription needed. Self-hosted MySQL Enterprise on cloud VMs requires the same commercial subscription as on-premises. Self-hosted Community is free everywhere.
The GNU General Public License (GPL v2) is the open-source licence governing MySQL Community Edition. It permits free use but requires that if you distribute MySQL as part of another product, that product must also be GPL-licensed (copyleft). Internal use and SaaS delivery do not trigger GPL distribution obligations.
Oracle has audit rights over commercial MySQL subscribers under the subscription terms. For GPL Community Edition usage, Oracle does not have contractual audit rights. However, if Oracle discovers GPL violations (proprietary software distributed with Community MySQL), it can enforce GPL compliance or require commercial licensing.
MariaDB and Percona Server are MySQL-compatible forks providing enterprise features at lower or zero cost. Cloud-managed MySQL services eliminate Oracle licensing entirely. Third-party support providers (for example Percona support) offer enterprise support for Community Edition at approximately half the cost of Oracle Enterprise.
Key strategies include maximising Community Edition usage for non-critical and non-production workloads, right-sizing from Enterprise to Standard where enterprise features are not needed, consolidating databases onto fewer servers, migrating to cloud-managed services, evaluating MariaDB/Percona as alternatives, and negotiating volume discounts with Oracle.
No. If your application is delivered as SaaS (customers access via web browser or API, not local installation), you are not distributing MySQL itself. Internal server-side deployment of MySQL Community is not distribution under GPL. However, if you need Enterprise features or Oracle support for your SaaS infrastructure, a commercial licence applies.
The OEM/Embedded licence is a commercial agreement for ISVs and OEMs who redistribute MySQL within their proprietary products. It eliminates GPL copyleft obligations and is priced on a per-deal basis, typically based on distribution volume. OEM agreements can significantly reduce per-instance cost compared to standard subscriptions for high-volume distribution.