Oracle · MySQL Licensing

MySQL Licensing: Complete Guide to the Dual GPL/Commercial Model

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.

Book a Confidential Call Oracle Advisory Services
Call us: +1 (239) 402-7397
$0 GPL
Community Edition Free for Internal Use
$2K--$10K
Per Server Per Year (Commercial)
Per Server
Not Per User, Not Per Core
Dual Licence
GPL Open Source + Commercial Subscription
Oracle Knowledge Hub MySQL Licensing: Complete Guide

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

1. Executive Summary: MySQL's Dual Licensing Model and Why It Creates Enterprise Complexity

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.

DimensionMySQL 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 obligationGPL 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 useFully permitted. No source code disclosure for purely internal deployments.Fully permitted.Internal-only use can always use Community at $0.
Oracle supportNo Oracle support. Community forums and self-support only.24x7 Oracle support included with commercial subscription.Mission-critical systems may require vendor support SLAs.
Enterprise featuresCommunity 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 exposureNo Oracle audit rights over GPL usage.Oracle can audit commercial licence compliance under subscription terms.Commercial users must track and document server counts accurately.

2. MySQL Editions: Feature Comparison and When Each Edition Applies

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.

EditionLicence TypeApprox. Annual CostKey Features IncludedBest For
Community EditionGPL (open source)$0Core MySQL database engine. InnoDB storage engine. Replication. Partitioning. Performance schema. MySQL Shell.Internal applications. Development/test. Non-critical workloads. Open-source projects.
Standard EditionCommercial subscription~$2,000/server/yearCommunity features + MySQL Router + 24x7 Oracle support + updates/patches.Production workloads needing vendor support but not enterprise features.
Enterprise EditionCommercial subscription~$5,000/server/yearStandard 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 CGECommercial subscription~$10,000/server/yearEnterprise 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/EmbeddedCommercial agreementNegotiated per dealRight 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?

3. Pricing Mechanics: How MySQL Commercial Costs Scale with Server Size and Count

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.

Per-Server Pricing by Socket Count

Server SizeStandard /YearEnterprise /YearCluster CGE /YearCost Driver
1 to 4 sockets~$2,000~$5,000~$10,000Most common tier. Covers typical enterprise servers.
5 to 8 sockets~$4,000~$10,000~$20,000Large servers double the subscription cost.
8+ socketsContact OracleContact OracleContact OracleVery large servers. Custom pricing required.

Total Cost Across Typical Deployments

ScenarioServersEditionAnnual Cost3-Year TotalAlternative
Small internal app2 (1 prod + 1 dev)Community (GPL)$0$0No commercial licence needed for internal use.
Medium production5 (3 prod + 2 dev/test)Standard$10,000$30,000Consider Community + third-party support (~$5K/year).
Large mission-critical15 (10 prod + 5 non-prod)Enterprise$75,000$225,000Evaluate which servers truly need Enterprise vs Standard.
ISV embedding in SaaS50 customer instancesEnterprise 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.

4. GPL Compliance: What the Open-Source Licence Requires and Where It Triggers

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 ScenarioGPL Triggered?Source Disclosure?Commercial Licence?Explanation
Internal enterprise app using MySQL Community as backendNoNoNo. Internal use does not constitute distribution under GPL.The most common enterprise scenario. Completely free.
SaaS app with MySQL Community as backendNoNoNo. 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 GPLYes, but satisfied automaticallyYes, already providedNo. GPL-compatible distribution.Your product's GPL licence satisfies MySQL's GPL requirement.
Proprietary software distributed with MySQL Community bundledYes. 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 embeddedYesYesYes. OEM/embedded licence required.Physical distribution triggers GPL distribution rules.
Proprietary software connecting to MySQL via network onlyDebated. 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.

5. Cloud and Managed Service Licensing: When You Need a Licence and When You Do Not

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 ModelSeparate Oracle Licence?Cost StructureKey Considerations
AWS RDS for MySQLNo. AWS handles licensing.AWS hourly/reserved instance pricing (Community under the hood).No Enterprise features. AWS provides operational support.
Azure Database for MySQLNo. Microsoft handles licensing.Azure pricing tiers (Flexible Server).Community Edition. Azure provides backups, HA, monitoring.
Google Cloud SQL for MySQLNo. 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 VMYes. 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 VMNo. 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.

6. Container and Kubernetes Deployment: How Each Instance Counts for Licensing

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 ScenarioLicences RequiredAnnual Cost (Enterprise)Risk
Single MySQL Community container in Docker0. GPL, no licence needed.$0No Oracle compliance risk. But no Oracle support.
10 MySQL Enterprise containers in Kubernetes10 server subscriptions.$50,000Each container = separate server. Auto-scaling can create unlicensed instances.
Kubernetes auto-scaling from 5 to 20 pods20 server subscriptions (peak count).$100,000Oracle may count peak concurrent instances. Scaling creates compliance gaps.
MySQL Community in K8s with Percona operator0$0Open-source alternative avoids all Oracle licensing. Percona provides enterprise features.
Ephemeral MySQL Enterprise containers for CI/CDEach 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.

7. Non-Production Environment Licensing: What Oracle Requires for Dev, Test, and DR

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.

EnvironmentMySQL CommunityMySQL EnterpriseRecommended Approach
ProductionFree. No licence needed.Full subscription required.Use Enterprise only for mission-critical production systems.
DevelopmentFree.Full subscription required.Use Community for development. Functionally equivalent core engine.
Testing / QAFree.Full subscription required.Use Community unless testing Enterprise-specific features.
StagingFree.Full subscription required.Use Community where possible. Licence staging only if Enterprise features needed for validation.
Disaster RecoveryFree.Full subscription required (active or passive).Negotiate DR rights in commercial agreement. Otherwise licence fully.
Training / SandboxFree.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.

8. Compliance Risks and Oracle Audit Exposure: What Can Go Wrong

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 RiskWhat HappensFinancial ExposurePrevention
Unlicensed MySQL Enterprise installationsDev/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 CommunityCommercial 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 sprawlAuto-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 installationEnterprise 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 installationsDevelopers 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.

9. Cost Optimisation Strategies: How to Minimise MySQL Licensing Spend

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.

StrategyHow It WorksExpected SavingsTrade-Off
Maximise Community Edition usageDeploy 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 EditionUse 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 workloadsRun 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 MySQLMigrate 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 ServerMySQL-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 discountsMulti-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.

10. Final Action Plan: 10-Step MySQL Licensing Compliance Checklist

1

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.

2

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.

3

Map licences to installations. Verify every MySQL Enterprise instance has a valid, current Oracle subscription. No unlicensed Enterprise installations.

4

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.

5

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.

6

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.

7

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.

8

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.

9

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.

10

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.

Frequently Asked Questions

Is MySQL free for enterprise use?
+

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.

When do I need to buy a MySQL commercial licence?
+

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.

What is the difference between MySQL Community and Enterprise Edition?
+

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.

How much does MySQL Enterprise Edition cost?
+

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.

Does MySQL require licensing per user?
+

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.

Do I need a MySQL licence for development and test servers?
+

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.

How does MySQL licensing work in containers and Kubernetes?
+

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.

Do I need a licence for MySQL in the cloud?
+

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.

What is the GPL and how does it affect MySQL?
+

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.

Can Oracle audit my MySQL usage?
+

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.

What alternatives exist to MySQL 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.

How can I reduce MySQL licensing costs?
+

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.

Does SaaS delivery require a MySQL commercial licence?
+

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.

What is the MySQL OEM/Embedded licence?
+

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.

Related Resources

Knowledge Hub
Oracle Licensing Knowledge Hub
Service
Oracle License Management
Service
Oracle Audit Defence
Service
Oracle Contract Negotiation
Service
Oracle ULA Optimisation
Tools
Oracle Assessment Tools
Playbook
Oracle Audit Response Playbook
Services
Oracle Advisory Services
FF

Fredrik Filipsson

Co-Founder & Enterprise Software Advisory Lead, Redress Compliance

20+ years in enterprise software licensing. Former IBM, SAP, and Oracle. 11 years as an independent consultant advising hundreds of Fortune 500 companies on Oracle, Microsoft, SAP, IBM, and Salesforce licensing, contract negotiations, and cost optimisation.

← Back to Oracle Knowledge Hub