Quick verdict
Choose MySQL if you want a free, GPL licensed server that runs on Windows, Linux and macOS, fits PHP and web stacks, and is offered as a managed service on the major clouds. Choose SQL Server if you are invested in Microsoft tooling and .NET, want edition features such as availability groups, Query Store and T-SQL programmability, and can either live within the free Express limits or budget for Standard or Enterprise licences. If cost is the deciding factor and you outgrow Express, MySQL (or PostgreSQL) is usually the cheaper path.
MySQL is developed by Oracle. The Community Server is free to download and, according to Oracle's licensing page, is available under the GPLv2 (with an additional permission for included software under other licences); Oracle also sells a commercial licence for embedding MySQL in proprietary software and paid editions such as MySQL Enterprise Edition. MySQL now ships on two tracks: LTS releases that only receive fixes (the current LTS lines are 8.4 and 9.7), and Innovation releases that add features and can change behaviour. From July 2026 Oracle switched to calendar version numbers, so the newest Innovation release is MySQL 26.7.
SQL Server is Microsoft's relational database. The current release is SQL Server 2025 (17.x); Microsoft's update list showed Cumulative Update 9 (build 17.0.5005.3, September 2026) as the latest when we checked. Paid editions are Enterprise and Standard. Two editions are free: Express, which Microsoft describes as suitable for development and production of desktop, web and small server applications, and Developer (Standard Developer and Enterprise Developer in 2025), which is licensed for development and test only. SQL Server runs on Windows and on supported Linux distributions.
Both are mature, ACID compliant relational databases. The differences that matter for a decision are licence cost at scale, operating system support, the SQL dialect (MySQL SQL versus Transact-SQL), edition gating of features in SQL Server, and the surrounding tools and cloud services.
Side by side
| Aspect | MySQL | SQL Server |
|---|---|---|
| Licence | Community Server under GPLv2; commercial licence and paid editions from Oracle | Proprietary Microsoft licence; per core or Server + CAL for Standard, per core for Enterprise |
| Free option | Community Server, free for production use under the GPL terms | Express (production allowed, with limits) and Developer (dev and test only) |
| Current versions (Oct 2026) | 9.7 LTS, 8.4 LTS, and 26.7 Innovation | SQL Server 2025 (17.x), CU9 |
| Server platforms | Windows, many Linux distributions, macOS (per the download page) | Windows; Linux (RHEL 9 and 10, Ubuntu 22.04 and 24.04 for 2025); Docker on x86-64 Linux hosts. No native macOS. |
| SQL dialect | MySQL SQL with its own stored program syntax | Transact-SQL (T-SQL) |
| Default concurrency | InnoDB multi-versioning, REPEATABLE READ by default | READ COMMITTED with locking by default; row versioning available via READ_COMMITTED_SNAPSHOT or SNAPSHOT isolation |
| JSON | Native JSON type stored in a binary format | Native json data type and JSON indexing in SQL Server 2025 (all editions) |
| High availability | Replication and Group Replication in Community; more tooling in paid editions | Always On availability groups (Enterprise); basic availability groups, two replicas and one database (Standard); not in Express |
| Managed cloud | Amazon RDS, Google Cloud SQL, Azure Database for MySQL, Oracle MySQL HeatWave | Azure SQL family, Amazon RDS, Google Cloud SQL |
| Main trade-off | Fewer built-in enterprise features in the free server; advanced security and backup tools are Enterprise only | Licence cost rises with cores; many HA and performance features are Enterprise only |
Key differences
Licensing and what is free
MySQL Community Server is free and GPL licensed. The GPL matters mainly if you distribute software that embeds MySQL: Oracle states its commercial licence exists so OEMs, ISVs and VARs can ship MySQL with their own commercial software without the GPL's source distribution requirement. Running MySQL as the database behind your own web application is the common case and does not involve distribution, but this is a licence question to check for your situation, not legal advice.
SQL Server is proprietary. Express is free and can be used in production, but SQL Server 2025 Express is limited to the lesser of 1 socket or 4 cores, 1,410 MB of buffer pool memory per instance, and a 50 GB maximum relational database size (Microsoft's SQL Server 2025 editions page; SQL Server 2022 Express was limited to 10 GB). Developer edition has the full Standard or Enterprise feature set but cannot be used in production. See SQL Server Express vs Standard and Express vs Developer for the edition detail.
Platform support
MySQL Community Server downloads are offered for Windows, Ubuntu, Debian, SUSE, Red Hat and Oracle Linux, Fedora and macOS, plus source code. SQL Server 2025 runs on Windows and, per Microsoft's Linux release notes, on Red Hat Enterprise Linux 9.x and 10.x and Ubuntu 22.04 and 24.04; SUSE Linux Enterprise Server is not supported from SQL Server 2025. SQL Server container images are supported only on Linux hosts with Intel or AMD x86-64 CPUs, and Microsoft states that emulation such as Rosetta 2 is not tested or supported. If your developers use Apple silicon Macs, MySQL installs natively; SQL Server needs a remote or x86-64 host.
SQL dialect: the same queries written both ways
Everyday SELECT, JOIN and GROUP BY queries look the same. The differences show up in row limiting, auto-numbering, upserts, string aggregation and procedural code. These short examples are written for MySQL 8.4 or later and SQL Server 2017 or later.
First 10 rows
-- MySQL
SELECT id, name FROM customers ORDER BY name LIMIT 10;
-- SQL Server (T-SQL)
SELECT TOP (10) id, name FROM customers ORDER BY name;
-- or, SQL Server 2012 and later
SELECT id, name FROM customers ORDER BY name
OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;Auto-numbered key
-- MySQL
CREATE TABLE orders (
id INT AUTO_INCREMENT PRIMARY KEY,
total DECIMAL(10,2) NOT NULL
);
-- SQL Server (T-SQL)
CREATE TABLE orders (
id INT IDENTITY(1,1) PRIMARY KEY,
total DECIMAL(10,2) NOT NULL
);Insert or update (upsert). MySQL uses ON DUPLICATE KEY UPDATE; its manual marks the older VALUES() reference as deprecated in favour of a row alias. SQL Server uses MERGE, which must end with a semicolon.
-- MySQL
INSERT INTO stock (sku, qty) VALUES ('A1', 5) AS new
ON DUPLICATE KEY UPDATE qty = new.qty;
-- SQL Server (T-SQL)
MERGE INTO stock AS t
USING (VALUES ('A1', 5)) AS s (sku, qty)
ON t.sku = s.sku
WHEN MATCHED THEN UPDATE SET t.qty = s.qty
WHEN NOT MATCHED THEN INSERT (sku, qty) VALUES (s.sku, s.qty);Comma separated list per group. SQL Server added STRING_AGG in SQL Server 2017. MySQL uses GROUP_CONCAT, whose result is truncated at the group_concat_max_len setting.
-- MySQL
SELECT dept, GROUP_CONCAT(name ORDER BY name SEPARATOR ', ') AS staff
FROM employees GROUP BY dept;
-- SQL Server (T-SQL)
SELECT dept, STRING_AGG(name, ', ') WITHIN GROUP (ORDER BY name) AS staff
FROM employees GROUP BY dept;Stored procedures, variables, error handling and temporary tables differ more than queries do, so plan to rewrite procedural code in a migration. The SQL functions library covers T-SQL equivalents.
Concurrency and isolation defaults
MySQL's InnoDB engine uses multi-versioning: its default isolation level is REPEATABLE READ, and plain SELECT statements in a transaction read a consistent snapshot. SQL Server defaults to READ COMMITTED with shared locks; Microsoft documents that READ_COMMITTED_SNAPSHOT is OFF by default on SQL Server (it is ON by default in Azure SQL Database), and turning it on makes reads use row versions instead of shared locks. Teams moving from MySQL to SQL Server often enable it to get similar reader and writer behaviour, but it is a database setting to evaluate, not a free switch.
Edition gating in SQL Server
MySQL Community Server includes replication and Group Replication. Oracle reserves tools such as Enterprise Backup, Transparent Data Encryption, Enterprise Audit, Enterprise Firewall and data masking for MySQL Enterprise Edition. SQL Server gates by edition in a different way: per Microsoft's SQL Server 2025 editions page, full Always On availability groups, online index rebuilds and several query processing features are Enterprise only; Standard is limited to the lesser of 4 sockets or 32 cores and 256 GB of buffer pool memory, and gets basic availability groups (two replicas, one database); Express has no SQL Server Agent, so scheduled jobs need an external scheduler. Read the Standard vs Enterprise comparison before sizing a licence.
Pricing and licensing
MySQL. Community Server is free under the GPLv2. Oracle does not list MySQL Enterprise Edition prices on the Enterprise Edition product page checked; it directs buyers to sales. Managed MySQL services (Amazon RDS, Google Cloud SQL, Azure Database for MySQL, MySQL HeatWave) are billed by each cloud provider.
SQL Server 2025. Listed on the vendor's pricing sheet in October 2026, in US dollars, as open no-level estimated retail prices (your reseller price may differ): Enterprise USD 15,123 per 2-core pack; Standard USD 3,945 per 2-core pack under per core licensing, or USD 989 per server plus USD 230 per client access licence (CAL) under Server + CAL. Subscription pricing through volume licensing is listed at USD 5,434 per year per 2-core pack for Enterprise and USD 1,418 per year per 2-core pack for Standard. Microsoft also lists pay-as-you-go billing through Azure Arc. Developer (Standard and Enterprise) and Express are free downloads.
Pricing checked on the vendors' official pages on 7 October 2026. Prices change; confirm before buying.
Where each one leads
MySQL strengths
- Free GPLv2 Community Server with no core or memory caps imposed by licence
- Native server builds for Windows, Linux and macOS
- Group Replication and standard replication included in the free server
- Offered as a managed service by AWS, Google Cloud, Azure and Oracle
- Clear release tracks: LTS lines for stability and Innovation releases for new features
SQL Server strengths
- Free Express edition usable in production, and full featured Developer editions for dev and test
- Transact-SQL with mature procedural features, plus MERGE and STRING_AGG
- SQL Server 2025 adds a native json data type, JSON indexing and a vector data type in all editions
- Mature first-party tooling: SSMS 22 and SQL Server Agent (Standard and above)
- Single vendor for engine, Azure SQL services and support
Limitations
MySQL limitations
- Backup, audit, firewall and encryption tooling that many enterprises expect is in the paid Enterprise Edition
- GPL terms affect you if you distribute software that embeds MySQL; otherwise a commercial licence is needed
- Innovation releases are supported only until the next Innovation release and can change behaviour
- GROUP_CONCAT output is truncated at group_concat_max_len unless you raise it
SQL Server limitations
- Express (2025) is capped at 50 GB per database, 1,410 MB buffer pool and the lesser of 1 socket or 4 cores, with no SQL Server Agent
- Paid editions are licensed per core or per server plus CALs, which adds up on large hosts
- Full availability groups and many performance features require Enterprise
- No native macOS server, and containers are supported only on x86-64 Linux hosts
- SSMS is a Windows application; macOS and Linux users rely on other clients
When to choose each
Choose MySQL if
- You are building a PHP, WordPress or similar web stack where MySQL is the expected database
- You want a production database with no licence fee and are comfortable with the GPL
- Your developers work on macOS or Linux and want the server running locally
- You want to stay portable across AWS, Google Cloud, Azure and Oracle managed services
Choose SQL Server if
- Your applications are .NET based or your team already writes T-SQL
- You need availability groups, Query Store, SQL Server Agent jobs and other edition features
- Your data fits within Express limits today and you want a supported upgrade path to Standard
- You plan to use Azure SQL Database or Azure SQL Managed Instance later
- You want one vendor for engine, tooling and support
When neither is right
- You want an open source engine with richer SQL features (extensions, jsonb indexing, MERGE and ON CONFLICT) and a permissive licence: look at PostgreSQL. See MySQL vs PostgreSQL and SQL Server vs PostgreSQL.
- You need an embedded, single-file database inside an application or device: SQLite is a better fit than either server. See SQLite vs MySQL.
- Your data is document shaped with no fixed schema: compare against a document database first. See SQL vs NoSQL.
- You want MySQL compatibility under a foundation-governed GPL project: consider MariaDB, after checking the differences in MariaDB vs MySQL.
Final recommendation
For a new web application with no Microsoft dependency, MySQL is the lower cost and more portable choice: the free Community Server runs on every major operating system and every major cloud. SQL Server earns its place when you are in the Microsoft ecosystem, want T-SQL and its edition features, or can start on free Express and later pay for Standard. Before committing to SQL Server, check the Express limits and price the Standard or Enterprise licence you would need at your expected core count; before committing to MySQL, check whether you need Enterprise Edition tooling for backup, audit or encryption.
Frequently asked questions
Is SQL Server free like MySQL?
Partly. SQL Server Express is free and can run in production, but SQL Server 2025 Express is limited to 50 GB per database, 1,410 MB of buffer pool memory and the lesser of 1 socket or 4 cores. Developer edition is free but for development and test only. Standard and Enterprise are paid. MySQL Community Server is free under the GPLv2 with no such caps. See SQL Server Express vs Developer.
Does SQL Server run on Linux or macOS?
SQL Server 2025 runs on Red Hat Enterprise Linux 9.x and 10.x, Ubuntu 22.04 and 24.04, and in Docker on x86-64 Linux hosts, according to Microsoft's release notes. There is no native macOS version, and Microsoft does not support running the containers under emulation such as Rosetta 2. MySQL offers native macOS builds.
What is the difference between MySQL SQL and T-SQL?
Core queries are similar, but syntax differs for row limits (LIMIT vs TOP or OFFSET FETCH), auto-numbering (AUTO_INCREMENT vs IDENTITY), upserts (ON DUPLICATE KEY UPDATE vs MERGE), string aggregation (GROUP_CONCAT vs STRING_AGG) and almost all procedural code. The examples above show each pair.
What are MySQL LTS and Innovation releases?
LTS releases (currently 8.4 and 9.7) receive only fixes and follow Oracle's Lifetime Support Policy of 5 years premier and 3 years extended support. Innovation releases add features and are supported only until the next Innovation release. From July 2026 MySQL uses calendar versions, so 26.7 is the July 2026 Innovation release.
Can I migrate from MySQL to SQL Server?
Yes, but plan for schema type mapping, query rewrites for the syntax differences shown above, and a rewrite of stored procedures and triggers. Microsoft lists SQL Server Migration Assistant (SSMA) among its database services. Test with your own queries and data before switching.
Sources
- Microsoft Learn: Editions and supported features of SQL Server 2025
- Microsoft: SQL Server 2025 pricing sheet (PDF)
- Microsoft: SQL Server downloads (Express and Developer)
- Microsoft Learn: Release information for SQL Server on Linux
- Microsoft Learn: SET TRANSACTION ISOLATION LEVEL
- MySQL Reference Manual: MySQL releases, Innovation and LTS
- MySQL Community Server downloads
- MySQL licensing information (GPLv2 and commercial licence)
- MySQL Enterprise Edition
- MySQL 8.4 Reference Manual: INSERT ... ON DUPLICATE KEY UPDATE
Checked October 2026.
How we research comparisons: our editorial method.