SQL Server and MySQL are both relational databases: they store business data in tables and are queried with SQL. The difference between SQL Server and MySQL that matters most to a business is commercial, not technical. SQL Server is a Microsoft product, licensed per processor core or per server and user, with a free edition for small databases. MySQL is owned by Oracle and comes as a free open source community edition and as paid commercial editions. Either will run a typical business system well. The choice is usually settled by what the application is written in, what your team or supplier knows, and what you are prepared to pay for licences and support.
SQL Server and MySQL side by side
| SQL Server | MySQL | |
|---|---|---|
| Owner | Microsoft | Oracle |
| Licence | Commercial | Community edition is open source under the GPL. Commercial editions are sold by Oracle |
| Free for live use | Express edition, with limits on database size, memory and processor cores | Community edition, with no size limit |
| Paid editions | Standard and Enterprise | Standard and Enterprise, among others |
| Current versions | SQL Server 2025, released in November 2025 | 8.4 and 9.7, both long-term support releases |
| Vendor support for each version | About ten years | Five years of premier support and three of extended support for a long-term support release |
| Runs on | Windows and Linux | Linux, Windows and macOS |
| Most often found with | .NET applications | PHP applications, including WordPress |
| Dialect of SQL | Transact-SQL, known as T-SQL | MySQL’s own |
Licences and editions
SQL Server has three editions that matter for live systems.
- Express is free. In SQL Server 2025 each database can be up to 50 GB, raised from 10 GB in earlier versions. It is restricted in the memory and processor cores it will use, and it has no SQL Server Agent, the built-in scheduler normally used for backups and overnight jobs.
- Standard is licensed either per processor core or per server with a client access licence for every user or device.
- Enterprise is licensed per core only and adds features for very large or very high-availability systems.
There are also free Developer editions, which may not be used for live systems. One change catches people out: the Web edition, a lower-cost edition offered through hosting and cloud providers, was discontinued in SQL Server 2025. A system on Web edition today needs a plan for which edition it moves to.
SQL Server licensing has detailed rules about cores and virtual machines. Have a Microsoft licensing reseller confirm what you need before you buy or move servers.
MySQL Community edition is free to run, for internal systems and public websites alike. Oracle’s Enterprise edition adds an online backup tool, auditing, encryption of the data files, a database firewall and support from Oracle’s own engineers.
Because the community edition is under the GPL, a company that ships MySQL inside a product it sells may need a commercial licence from Oracle instead. Our article on open source and proprietary software explains why, and it is a point to take legal advice on.
One more name to know is MariaDB, a separate open source database started by MySQL’s original developers. Many Linux servers described as running MySQL are in fact running MariaDB. The two have diverged over the years, so find out which one you have.
Support dates
Microsoft supports each SQL Server version for about ten years: five of mainstream support and five of security fixes only. SQL Server 2016 stopped receiving free security fixes on 14 July 2026. SQL Server 2017 follows on 12 October 2027, SQL Server 2019 on 8 January 2030 and SQL Server 2022 on 11 January 2033. SQL Server 2025 is supported until 6 January 2036. Our SQL Server end-of-support page keeps the full list.
MySQL moves faster. MySQL 5.7 left support in October 2023 and MySQL 8.0 on 21 April 2026. Oracle advises users of 8.0 to move to 8.4 or 9.7. Between long-term support releases Oracle publishes what it calls innovation releases, each supported only until the next one appears. A business system belongs on a long-term support release.
Both are also sold as managed cloud services, such as Azure SQL Database and Azure Database for MySQL. The provider then applies the patches, and sets its own dates for retiring old versions.
The technical differences that matter
The SQL is not interchangeable. Simple queries look the same in both. Stored procedures, functions, date handling and many data types do not, so code written for one has to be converted and retested for the other.
SQL Server includes more in the box. The paid editions come with a job scheduler, tools for moving data between systems and an analysis engine, and SQL Server Management Studio is a free administration tool. MySQL is leaner, and the jobs around it are usually handled by the operating system’s scheduler and separate tools.
Some old comparisons no longer hold. The claim that MySQL must lock the database to take a backup does not apply to InnoDB, the storage engine it has used by default for many years. The claim that SQL Server needs Windows has been out of date since SQL Server 2017, which added Linux.
Performance is rarely the deciding factor. At the size of database most businesses have, either product is fast when the tables are designed and indexed properly. A slow system is nearly always slow because of its queries, whichever product it runs on. If that is your problem, see our database performance service before considering a change of database.
Choosing one, or moving between them
For a new system, let the database follow the application. A .NET application sits most naturally on SQL Server, and a PHP application on MySQL. The opposite pairings work, but there are fewer developers who know both halves and fewer worked examples to draw on.
Neither is hard to hire for. In the Stack Overflow Developer Survey 2025, about 40% of respondents had worked with MySQL in the previous year and about 30% with SQL Server.
Moving an existing system from one to the other is a project, not a setting. Microsoft provides a free tool, SQL Server Migration Assistant for MySQL, which converts tables and data and attempts the stored code. Every query in the application still has to be checked and tested, and the same is true in the other direction. Licence savings alone seldom justify it. If SQL Server licence cost is the concern, first check whether a smaller edition would do: with the 50 GB limit in SQL Server 2025, many small systems fit within Express.
CodeFirst works mostly with SQL Server, so weigh our view accordingly. We would not move a healthy MySQL system to SQL Server without a reason beyond preference.
What to check if you have inherited one
- The exact version and edition, and whether a “MySQL” server is really MariaDB.
- Whether that version still receives security fixes.
- Whether backups are taken, and when one was last restored as a test.
- For SQL Server, which licences you hold and whether they match the servers in use. For MySQL, whether you distribute it with a product.
- Whether anything depends on a feature of a paid edition, which limits where the database can move.
If the answer to the second question is no, our SQL Server upgrades page describes how a rehearsed upgrade works.