# MySQL

**MySQL** 是一个开源的 SQL 数据库管理系统，现由[甲骨文公司](https://www.edgepedia.org/zh/oracle-corporation)（Oracle Corporation）开发、分发并提供支持。它将数据存储在关系表中，以多线程、多用户服务器的形式运行，并采用双许可证模式提供：开源使用遵循 GNU 通用公共许可证，或从甲骨文公司获取商业许可证。<sup>[1](https://dev.mysql.com/doc/refman/8.0/en/what-is-mysql.html)</sup><sup> • </sup><sup>[2](https://dev.mysql.com/doc/refman/9.7/en/introduction.html)</sup> 官方读音为“My Ess Que Ell”，不过该项目表示并不介意读作“my sequel”。<sup>[1](https://dev.mysql.com/doc/refman/8.0/en/what-is-mysql.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 一个开源的关系型 SQL 数据库管理系统，采用 GPL 与甲骨文商业许可证的双重许可<sup>[1](https://dev.mysql.com/doc/refman/8.0/en/what-is-mysql.html)</sup><sup> • </sup><sup>[2](https://dev.mysql.com/doc/refman/9.7/en/introduction.html)</sup> |
| 起源 | 项目由迈克尔·“蒙蒂”·维德纽斯（Michael "Monty" Widenius）、大卫·阿克马克（David Axmark）和阿兰·拉尔森（Allan Larsson）于1995年发起；最初六年由 TCX 公司进行商业代理<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup> |
| 公司沿革 | MySQL AB 于2008年以约10亿美元出售给太阳微系统公司（Sun Microsystems）；甲骨文随后收购太阳微系统，交易于2010年完成<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup><sup> • </sup><sup>[4](https://blogs.oracle.com/mysql/mysql-enters-a-new-decade)</sup> |
| 默认存储引擎 | InnoDB，一个事务安全、符合 ACID 的引擎，支持提交、回滚、崩溃恢复和行级锁定<sup>[5](https://www.mysql.com/products/enterprise/database/)</sup> |
| 发布模式 | 分为 LTS 与 Innovation 两条轨道；MySQL 9.7.0 LTS 于2026年4月21日发布，此后的版本改用日历版本号，如2026年7月版为26.7<sup>[6](https://dev.mysql.com/doc/refman/9.7/en/mysql-releases.html?ff=nopfpls)</sup><sup> • </sup><sup>[7](https://www.mysql.com/news-and-events/)</sup> |
| 版本状态 | MySQL 8.0 于2026年4月随版本 8.0.46 到达生命周期终点；用户被引导至 MySQL 8.4 LTS 或更新版本<sup>[8](https://dev.mysql.com/doc/relnotes/mysql/8.0/en/)</sup> |
| 开发者采用率 | 在2025年 Stack Overflow 开发者调查中，40.5%的受访者表示使用，仅次于 PostgreSQL 的55.6%<sup>[9](https://pg.center/ecosystem/stackoverflow/)</sup> |

## 历史

**起源。** 项目始于1995年，迈克尔·维德纽斯、大卫·阿克马克和阿兰·拉尔森共同创办了 MySQL；最初六年由 TCX 公司进行商业代理，该公司为三位创始人之一所有，蒙蒂在芬兰，大卫和阿兰在瑞典。<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup> 这个名字来自蒙蒂·维德纽斯的女儿“My”。开发者最初打算将 mSQL 数据库系统与他们自己编写的高速底层（ISAM）例程配合使用，但认定 mSQL 不够快、也不够灵活，于是构建了一个新的 SQL 接口，其 API 与 mSQL 几乎相同，以便于移植第三方代码。<sup>[10](https://dev.mysql.com/doc/refman/9.7/en/history.html)</sup>

第一个版本于1995年5月发布。<sup>[11](https://blogs.oracle.com/mysql/19952025-30-years)</sup> 首次对外发布是在1996年8月，仅提供 Solaris 的二进制构建版本，特性包括多线程、用于单遍多表连接的连接优化器、ODBC 驱动和多键表；Linux 2.0 的二进制版本于1996年11月跟进，源代码于12月发布。<sup>[12](https://blogs.oracle.com/mysql/mysql-retrospective-the-early-years)</sup>

**开源与成长。** 2000年，MySQL 以 GNU 通用公共许可证开源；收入因此下降80%，用了一年时间才弥补损失。<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup> 莫滕·米科斯（Mårten Mickos）于2001年出任首席执行官，公司从斯堪的纳维亚的风险投资人处筹集了400万欧元的 A 轮融资，安装基数达到200万活跃安装。收入从2002年底的650万美元增长到2006年底的5000万美元，彼时 MySQL 在25个国家拥有320名员工，据估计在数据库安装基数中占33%的份额，但在当时150亿美元的数据库市场中仅占0.2%的收入。<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup> 2005年发布的 MySQL 5 增加了面向企业的特性，如存储过程、触发器、视图、游标和分布式事务。<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup>

**收购。** 2008年，MySQL AB 同意以约10亿美元被[太阳微系统公司](https://www.edgepedia.org/zh/sun-microsystems)收购，联合创始人维德纽斯和阿克马克在收购后不久离开太阳微系统。<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup> 甲骨文随后收购太阳微系统，交易于2010年完成，甲骨文由此成为 MySQL 的管理者。<sup>[4](https://blogs.oracle.com/mysql/mysql-enters-a-new-decade)</sup> 甲骨文早先已于2005年买下 Innobase——这家四人规模的芬兰公司正是 MySQL 的 InnoDB 存储后端背后的开发者。<sup>[3](https://planet.mysql.com/entry/?id=23788)</sup>

海豚标志名为 Sakila，得名于一场“给海豚取名”的竞赛；获胜作品来自安布罗斯·特韦巴泽（Ambrose Twebaze），一位来自埃斯瓦蒂尼的开源软件开发者，这个名字源自西斯瓦蒂语。<sup>[10](https://dev.mysql.com/doc/refman/9.7/en/history.html)</sup>

## 技术特征

**存储引擎。** MySQL 采用可插拔的存储引擎架构。InnoDB 是事务处理的主力：它完全符合 ACID，支持提交、回滚、崩溃恢复和行级锁定，在 MySQL 9.6 及更高版本中，它是仅有的两个既支持事务、又可为复制目的组合使用的引擎之一，另一个是 BLACKHOLE。<sup>[5](https://www.mysql.com/products/enterprise/database/)</sup><sup> • </sup><sup>[13](https://dev.mysql.com/doc/refman/9.6/en/replication-features-transactions.html)</sup> InnoDB 在缓冲池中缓存表和索引数据；在专用服务器上，通常会将最多80%的物理内存分配给它，缓冲池以页链表的形式管理，采用最近最少使用算法的一种变体，即中点插入法。<sup>[14](https://dev.mysql.com/doc/refman/9.7/en/innodb-buffer-pool.html)</sup> InnoDB 还支持 XA 分布式事务，将 ACID 特性扩展到多个事务资源之上。<sup>[15](https://dev.mysql.com/doc/refman/9.7/en/xa.html)</sup>

**复制与集群。** 复制将数据从源服务器复制到一个或多个副本，默认是异步的；MySQL 8.0 还支持半同步复制，即源端的提交会阻塞，直到至少一个副本确认收到该事务的事件。<sup>[16](https://dev.mysql.com/doc/refman/8.0/en/replication.html)</sup> 复制支持横向扩展、在副本上备份、在实时副本上做分析，以及远距离数据分发。<sup>[16](https://dev.mysql.com/doc/refman/8.0/en/replication.html)</sup> 对于同步复制，MySQL 提供 NDB Cluster，服务器还支持使用 NDBCLUSTER 存储引擎的高可用集群。<sup>[16](https://dev.mysql.com/doc/refman/8.0/en/replication.html)</sup><sup> • </sup><sup>[17](https://dev.mysql.com/doc/refman/8.0/en/compatibility.html)</sup>

**SQL 与标准。** MySQL 力求符合 ANSI SQL 标准，同时在能提升易用性的地方添加扩展，它支持基于 RFC 7159 的原生 JSON 数据类型，以及 SQL:2016 标准草案中 SQL/JSON 函数的一个子集。<sup>[17](https://dev.mysql.com/doc/refman/8.0/en/compatibility.html)</sup> 有文档记录的标准 SQL 差异包括权限行为——删除表时表权限不会自动撤销——以及 CAST() 函数不支持转换为 REAL 或 BIGINT。<sup>[18](https://dev.mysql.com/doc/mysql-reslimits-excerpt/8.0/en/differences-from-ansi.html)</sup> 近期版本增加了 JSON 支持，包括 JSON_TABLE() 函数、面向 SQL 和 NoSQL 应用的文档存储、公共表表达式、窗口函数、不可见索引和降序索引。<sup>[5](https://www.mysql.com/products/enterprise/database/)</sup>

## 发布模式

MySQL 的发布分为两条轨道：LTS（长期支持）和 Innovation（创新），两者都包含缺陷和安全修复，都被视为生产级。<sup>[6](https://dev.mysql.com/doc/refman/9.7/en/mysql-releases.html?ff=nopfpls)</sup> LTS 版本只包含必要的修复，系列首个版本发布后不再移除特性，并遵循甲骨文的生命周期支持政策，提供5年首要支持和3年扩展支持。Innovation 版本带有新特性和行为变更，仅支持到下一个 Innovation 版本发布为止。<sup>[6](https://dev.mysql.com/doc/refman/9.7/en/mysql-releases.html?ff=nopfpls)</sup>

MySQL 9.7 是最后一个使用顺序版本号的发布线。此后的版本采用 YY.M 格式的日历版本号，因此 MySQL 26.7 是2026年7月版，MySQL 27.7 是2027年7月版。<sup>[6](https://dev.mysql.com/doc/refman/9.7/en/mysql-releases.html?ff=nopfpls)</sup> MySQL 9.7.0 LTS 于2026年4月21日发布，在复制可观测性、高可用性、遥测、JSON 关系型开发和查询优化方面增加了能力，并在 MySQL 企业版中提供动态数据脱敏。<sup>[7](https://www.mysql.com/news-and-events/)</sup> MySQL 8.0 于2026年4月随版本 8.0.46 到达生命周期终点。<sup>[8](https://dev.mysql.com/doc/relnotes/mysql/8.0/en/)</sup> 平台支持也会随时间退役；例如，甲骨文自2026年9月29日起停止为 Oracle Solaris 构建所有 MySQL 二进制文件。<sup>[19](https://www.mysql.com/support/eol-notice.html)</sup>

## 采用情况与 PostgreSQL 的比较

MySQL 定位于 Web、电子商务、SaaS 和在线事务处理工作负载，甲骨文的产品页面将 Facebook、Twitter、Uber 和 [Booking.com](https://www.edgepedia.org/zh/booking-com) 列为其用户。<sup>[5](https://www.mysql.com/products/enterprise/database/)</sup> 在2025年 Stack Overflow 开发者调查中，40.5%的受访者表示使用 MySQL，在数据库中排名第二，仅次于 [PostgreSQL](https://www.edgepedia.org/zh/postgresql) 的55.6%。<sup>[9](https://pg.center/ecosystem/stackoverflow/)</sup> 一项2026年对362个热门开源 Java 项目的研究同样发现，MySQL 和 PostgreSQL 是其语料库中最受欢迎的数据库管理系统。<sup>[20](https://arxiv.org/abs/2605.06817)</sup>

这两个系统做出了不同的工程权衡。在2024年一项针对采用相同配置的 [Amazon RDS](https://www.edgepedia.org/zh/amazon-rds) 实例、运行 HammerDB TPC-C 写密集型工作负载的基准测试中，MySQL 每分钟完成的事务数约为 PostgreSQL 的4.5倍（4058 对 888），延迟不到后者的一半（179.6 毫秒对 448.5 毫秒）；该研究将此归因于 InnoDB 针对快速写入和高并发事务的调优，而 PostgreSQL 的预写日志和查询规划器更有利于读密集和复杂查询的工作负载。<sup>[21](https://kdhenderson.github.io/projects/RDSBenchmarking/)</sup>

## References

1. [What is MySQL? MySQL 8.0 Reference Manual](https://dev.mysql.com/doc/refman/8.0/en/what-is-mysql.html)
2. [MySQL 9.7 Reference Manual: General Information](https://dev.mysql.com/doc/refman/9.7/en/introduction.html)
3. [Dries Buytaert (2010). The history of MySQL AB, Planet MySQL](https://planet.mysql.com/entry/?id=23788)
4. [MySQL enters a new decade! Oracle MySQL Blog](https://blogs.oracle.com/mysql/mysql-enters-a-new-decade)
5. [MySQL Database product page, mysql.com](https://www.mysql.com/products/enterprise/database/)
6. [MySQL 9.7 Reference Manual: MySQL Releases: Innovation and LTS](https://dev.mysql.com/doc/refman/9.7/en/mysql-releases.html?ff=nopfpls)
7. [MySQL News Announcements, mysql.com](https://www.mysql.com/news-and-events/)
8. [MySQL 8.0 Release Notes, dev.mysql.com](https://dev.mysql.com/doc/relnotes/mysql/8.0/en/)
9. [Stack Overflow Developer Survey database rankings, PG.CENTER](https://pg.center/ecosystem/stackoverflow/)
10. [MySQL 9.7 Reference Manual: History of MySQL](https://dev.mysql.com/doc/refman/9.7/en/history.html)
11. [1995-2025: 30 years! Oracle MySQL Blog](https://blogs.oracle.com/mysql/19952025-30-years)
12. [MySQL Retrospective – The Early Years, Oracle MySQL Blog](https://blogs.oracle.com/mysql/mysql-retrospective-the-early-years)
13. [MySQL 9.6 Reference Manual: Replication and Transactions](https://dev.mysql.com/doc/refman/9.6/en/replication-features-transactions.html)
14. [MySQL 9.7 Reference Manual: InnoDB Buffer Pool](https://dev.mysql.com/doc/refman/9.7/en/innodb-buffer-pool.html)
15. [MySQL 9.7 Reference Manual: XA Transactions](https://dev.mysql.com/doc/refman/9.7/en/xa.html)
16. [MySQL 8.0 Reference Manual: Replication](https://dev.mysql.com/doc/refman/8.0/en/replication.html)
17. [MySQL 8.0 Reference Manual: MySQL Standards Compliance](https://dev.mysql.com/doc/refman/8.0/en/compatibility.html)
18. [MySQL Restrictions and Limitations: MySQL Differences from Standard SQL](https://dev.mysql.com/doc/mysql-reslimits-excerpt/8.0/en/differences-from-ansi.html)
19. [MySQL Product Support EOL Announcements, mysql.com](https://www.mysql.com/support/eol-notice.html)
20. [Analyzing the Adoption of Database Management Systems Throughout the History of Open Source Projects, arXiv](https://arxiv.org/abs/2605.06817)
21. [AWS RDS Benchmarking: PostgreSQL vs MySQL with HammerDB TPC-C, Kristin Henderson](https://kdhenderson.github.io/projects/RDSBenchmarking/)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems › Database engines and systems › Relational database engines

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/mysql

English original: https://www.edgepedia.org/mysql
