# MariaDB

**MariaDB** 是一个开源的关系型数据库管理系统，以 GPLv2 许可证发布，始于 2009 年 10 月，最初是由 [MySQL](https://www.edgepedia.org/zh/mysql) 的原作者米夏埃尔·“蒙蒂”·维德纽斯（Michael "Monty" Widenius）基于 MySQL 创建的分支<sup>[1](https://mariadb.org/wp-content/uploads/2019/11/MySQL-MariaDB-story.pdf)</sup><sup> • </sup><sup>[2](https://blog.mariadb.org/about/)</sup>。它被设计为 MySQL 的直接替代品，共享相同的客户端协议、API、端口以及数据和表定义文件格式，并在 MariaDB 基金会（MariaDB Foundation）的管理下开发<sup>[3](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/migrating-to-mariadb/moving-from-mysql/mysql-to-mariadb-compatibility-matrix)</sup><sup> • </sup><sup>[4](https://mariadb.com/docs/server/clients-and-utilities/server-client-software/mariadb-foundation)</sup>。

| 关键事实 | 详情 |
|---|---|
| 起源 | 在甲骨文（Oracle）宣布收购太阳微系统（Sun Microsystems）的计划后，由米夏埃尔·维德纽斯基于 MySQL 创建分支，于 2009 年 10 月发布<sup>[1](https://mariadb.org/wp-content/uploads/2019/11/MySQL-MariaDB-story.pdf)</sup> |
| 许可证与治理 | GPLv2；MariaDB 基金会拥有代码和官方开发树，并保持其对社区开放<sup>[2](https://blog.mariadb.org/about/)</sup><sup> • </sup><sup>[4](https://mariadb.com/docs/server/clients-and-utilities/server-client-software/mariadb-foundation)</sup> |
| 存储引擎 | 可按表插拔的引擎：InnoDB（企业版服务器中的默认引擎，符合 ACID）、Aria、ColumnStore、MyISAM 和 Memory<sup>[5](https://mariadb.com/docs/server/server-usage/storage-engines/storage-engines-storage-engines-overview)</sup><sup> • </sup><sup>[6](https://mariadb.com/docs/server/server-usage/storage-engines/innodb/innodb-storage-engine-introduction)</sup> |
| 复制 | 通过二进制日志进行主从复制，副本上设有中继日志；支持异步和半同步模式<sup>[7](https://mariadb.com/docs/server/ha-and-performance/standard-replication/replication-overview)</sup><sup> • </sup><sup>[8](https://mariadb.com/database-topics/mariadb-vs-mysql/)</sup> |
| 当前版本 | 截至 2026 年 8 月，有四个仍在维护的 LTS 系列：12.3、11.8、11.4 和 10.11；10.6 系列已于 2026 年 7 月 6 日停止支持<sup>[9](https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/)</sup> |
| MySQL 兼容性 | 协议兼容性高，但在 JSON 存储（LONGTEXT 与二进制）、GTID 格式和默认认证插件上存在差异<sup>[3](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/migrating-to-mariadb/moving-from-mysql/mysql-to-mariadb-compatibility-matrix)</sup> |
| 知名用户 | 维基百科运行在 MariaDB 上，MediaWiki 项目推荐使用 MariaDB 或 MySQL<sup>[10](https://www.techradar.com/pro/software-services/how-to-use-mediawiki-to-create-and-run-your-own-wiki-page)</sup> |

## 历史与治理

这一分支源于甲骨文于 2009 年 4 月宣布收购太阳微系统的计划，而太阳微系统已于 2008 年收购了 MySQL。维德纽斯及其部分团队于 2009 年 2 月离开太阳微系统，转而开发 Maria 存储引擎（后更名为 Aria），MariaDB 于 2009 年 10 月发布<sup>[1](https://mariadb.org/wp-content/uploads/2019/11/MySQL-MariaDB-story.pdf)</sup><sup> • </sup><sup>[11](https://planet.mysql.com/entry/?id=2109527)</sup>。最初的创建者是 Monty Program Ab 公司，该公司于 2013 年与 MariaDB Corporation Ab 合并；为表彰这一渊源，MariaDB Corporation 被授予“MariaDB 基金会创始成员”的荣誉称号<sup>[12](https://mariadb.org/contributions-our-lifeblood/)</sup>。

**基金会管理。** MariaDB 基金会作为一个法律实体成立，其章程于 2019 年 4 月 17 日生效，是 MariaDB 代码的托管者，也是 mariadb.org 和官方开发树的所有者<sup>[13](https://mariadb.org/bylaws/)</sup><sup> • </sup><sup>[4](https://mariadb.com/docs/server/clients-and-utilities/server-client-software/mariadb-foundation)</sup>。其既定目标包括提高采用率、确保社区补丁得到审查和采纳，以及保持 MariaDB 与 MySQL 的兼容性<sup>[4](https://mariadb.com/docs/server/clients-and-utilities/server-client-software/mariadb-foundation)</sup>。维德纽斯曾表示，该基金会消除了进一步分支的理由，并称 MariaDB 作为开源项目的未来得到了保障<sup>[11](https://planet.mysql.com/entry/?id=2109527)</sup>。

## 存储引擎架构

MariaDB 的标志性架构特征是其可插拔的存储引擎系统，允许同一服务器上的不同表使用不同的引擎，每个引擎针对不同的工作负载进行优化<sup>[5](https://mariadb.com/docs/server/server-usage/storage-engines/storage-engines-storage-engines-overview)</sup>。引擎可以面向事务型工作负载、分析型工作负载或高吞吐量工作负载，有些还服务于特殊用途，如联邦表访问、表分片和云表归档<sup>[5](https://mariadb.com/docs/server/server-usage/storage-engines/storage-engines-storage-engines-overview)</sup>。

MariaDB 文档记载的主要引擎包括：

- **InnoDB**，MariaDB 企业版服务器中的默认引擎，是一种通用事务型引擎，符合 ACID，非常适合在线事务处理，在混合读写工作负载上表现良好，并支持在线 DDL<sup>[6](https://mariadb.com/docs/server/server-usage/storage-engines/innodb/innodb-storage-engine-introduction)</sup>。
- **Aria**，由构建 MySQL 的 MyISAM、MERGE 和 MEMORY 引擎的同一批核心工程师开发，其既定目标是成为完全事务型的引擎，至少具备 InnoDB 的主要特性<sup>[14](https://mariadb.com/docs/server/server-usage/storage-engines/aria/aria-faq)</sup>。
- **ColumnStore**，面向大数据分析和混合事务分析处理（HTAP）<sup>[5](https://mariadb.com/docs/server/server-usage/storage-engines/storage-engines-storage-engines-overview)</sup>。
- **Memory**，用于保存在内存中的临时数据和缓存数据<sup>[5](https://mariadb.com/docs/server/server-usage/storage-engines/storage-engines-storage-engines-overview)</sup>。
- **MyISAM**，MySQL 遗留的面向读取的引擎<sup>[5](https://mariadb.com/docs/server/server-usage/storage-engines/storage-engines-storage-engines-overview)</sup>。

## 复制与高可用性

MariaDB 的标准复制将一个或多个主服务器的内容镜像到副本服务器上。启用二进制日志后，所有数据操纵和数据定义更新都会作为二进制日志事件写入二进制日志；副本读取主服务器的二进制日志，并通过以相同格式保存的中继日志应用这些事件，不再需要时旧的中继日志文件会被删除。副本会记录其在主服务器二进制日志中最后应用事件的位置<sup>[7](https://mariadb.com/docs/server/ha-and-performance/standard-replication/replication-overview)</sup>。复制可以是选择性的，涵盖所有数据库、特定数据库或单个表<sup>[7](https://mariadb.com/docs/server/ha-and-performance/standard-replication/replication-overview)</sup>。

MariaDB 和 MySQL 都支持异步和半同步复制，并且都通过多主集群和动态查询路由提供持续可用性。MariaDB 的多主集群基于 Galera Cluster，厂商将其描述为成熟的生产级解决方案，支持新实例的完整状态传输、恢复实例的自动重新加入以及大事务的流式复制<sup>[8](https://mariadb.com/database-topics/mariadb-vs-mysql/)</sup>。

## MySQL 兼容性与差异

MariaDB 最初被设计为 MySQL 的直接替代品，在库二进制协议、文件结构和 API 方面保持兼容性，为 MySQL 构建的应用程序和工具通常只需很少修改甚至无需修改即可连接到 MariaDB 服务器<sup>[3](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/migrating-to-mariadb/moving-from-mysql/mysql-to-mariadb-compatibility-matrix)</sup><sup> • </sup><sup>[8](https://mariadb.com/database-topics/mariadb-vs-mysql/)</sup>。随着两个项目的发展，尤其是在 MySQL 8.0 之后，两者在若干方面出现差异，迁移规划必须加以考虑<sup>[3](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/migrating-to-mariadb/moving-from-mysql/mysql-to-mariadb-compatibility-matrix)</sup>：

- **JSON。** MySQL 8.0 和 8.4 以原生二进制格式存储 JSON 文档，而 MariaDB 将 JSON 类型视为带有 CHECK 约束的 LONGTEXT 的别名，以文本形式存储 JSON。MariaDB 的文档称其 JSON 函数因此比 MySQL 快得多，但在两者之间复制 JSON 列需要使用基于语句的复制，或在 MySQL 侧将 JSON 存储为 TEXT 或 LONGTEXT<sup>[16](https://mariadb.com/docs/release-notes/community-server/about/compatibility-and-differences/incompatibilities-and-feature-differences-between-mariadb-and-mysql-unmaint/incompatibilities-and-feature-differences-between-mariadb-10-7-and-mysql-8)</sup>。
- **全局事务标识符。** MariaDB 使用自己的 GTID 结构，即 DomainID:ServerID:Sequence，不能与 MySQL 的 GTID 格式混用；混合环境必须使用基于位置的复制<sup>[3](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/migrating-to-mariadb/moving-from-mysql/mysql-to-mariadb-compatibility-matrix)</sup>。
- **认证。** MySQL 8.4 默认禁用较旧的 mysql_native_password 插件，转而使用 caching_sha2_password，而 MariaDB 继续支持并通常默认使用 mysql_native_password 或 unix_socket 认证<sup>[3](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/migrating-to-mariadb/moving-from-mysql/mysql-to-mariadb-compatibility-matrix)</sup>。

迁移工具已围绕这些差异形成规范。开源的 MariaDB Migrator 自 2026 年 10 月起全面可用，提供四种迁移模式（串行流式复制、并行流式复制、离线复制和基于复制的切换），在只读的评估与规划阶段运行 28 项兼容性检查，并支持 MySQL 5.7、8.0 和 8.4 作为源<sup>[17](https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/)</sup>。

## 发布模式与版本

MariaDB 使用三段式版本号 a.b.c，其中 a 是主系列，b 是表示功能级别的次版本号，c 是用于错误修复的补丁版本号；从 MariaDB 12 开始，主版本号预计每年递增<sup>[2](https://blog.mariadb.org/about/)</sup>。部分系列的全面可用日期包括：5.5 于 2012 年 2 月，10.6 于 2021 年 4 月，11.4 于 2023 年 12 月，11.8 于 2024 年 12 月，12.3 于 2026 年 5 月 28 日<sup>[15](https://mariadb.org/survey/2025-report/)</sup><sup> • </sup><sup>[2](https://blog.mariadb.org/about/)</sup>。

10.6 社区系列曾连续五年是部署最广泛的分支，已于 2026 年 7 月 6 日停止支持，最终版本 10.6.28 于同年 8 月 13 日发布；不会再有 10.6.29<sup>[9](https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/)</sup>。该系列退役后，仍有四个 LTS 系列处于社区维护之下：12.3 维护至 2029 年，11.8 至 2028 年，11.4 至 2029 年，10.11 至 2028 年<sup>[9](https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/)</sup>。

## 性能

已发布的基准测试结果因来源和工作负载而异。MariaDB 自己的比较指南报告称，独立基准测试显示 MariaDB 在跨越 10 年的 14 个版本中保持稳定性能，而 MySQL 的性能在 5.6 到 8.0 版本之间下降了近三分之一，MariaDB 在低并发工作负载中比 MySQL 8.0 快 13% 到 36%，每美元处理的事务数多 61%<sup>[18](https://mariadb.com/reference/mariadb-vs-mysql-comparison-guide-enterprise-features-security-2026/)</sup>。

Percona 于 2026 年进行的一项独立 sysbench 基准测试涵盖 10 个 InnoDB 兼容引擎版本、三个缓冲池层级以及 1 到 512 线程的并发，结果则更为复杂。MariaDB 10.11 在只读工作负载中以 128 线程下每秒 32,392 个事务领先，比次席引擎快 38%，并展现出最强的单线程读写性能；但 MariaDB 引擎在 128 线程时达到峰值，在更高并发下性能下降，而 MySQL 8.4 和 Percona 8.4 在读写测试中于 512 线程时达到约每秒 13,300 个事务<sup>[19](https://www.percona.com/blog/2026-mysql-ecosystem-performance-benchmark-report/)</sup>。同一报告指出，MariaDB 12.1 在只读工作负载中相对于 10.11 退化了约 35%<sup>[19](https://www.percona.com/blog/2026-mysql-ecosystem-performance-benchmark-report/)</sup>。

## 采用与生态

MariaDB 基金会的首次 MariaDB 现状调查（2025 年）收集了 275 份回复。受访者经验丰富，60% 报告拥有超过 15 年的 IT 从业经验；生产部署方式以 MariaDB 提供的 Linux 软件包（44%）、发行版提供的软件包（40%）和 Docker 官方镜像（34%）为主，各种形式的云部署合计占受访者的 40%<sup>[15](https://mariadb.org/survey/2025-report/)</sup>。在应用方面，[WordPress](https://www.edgepedia.org/zh/wordpress) 居首，其次是 NextCloud/[ownCloud](https://www.edgepedia.org/zh/owncloud)、[MediaWiki](https://www.edgepedia.org/zh/mediawiki)、Drupal、GitLab 和 Moodle；19% 的受访者在 AI 应用中使用 MariaDB，最常见的是与 OpenAI、Ollama、Gemini、Claude、Langchain、MCP 和 HuggingFace 配合使用<sup>[15](https://mariadb.org/survey/2025-report/)</sup>。

MariaDB 也可通过托管服务获得：[Amazon RDS](https://www.edgepedia.org/zh/amazon-rds) 将 MariaDB 作为原生引擎支持，对于 InnoDB 每表文件表空间，最大表大小为 16 TB，MariaDB Cloud 可在 AWS、Google Cloud 或 [Microsoft Azure](https://www.edgepedia.org/zh/microsoft-azure) 上运行<sup>[20](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.Limitations.html)</sup><sup> • </sup><sup>[8](https://mariadb.com/database-topics/mariadb-vs-mysql/)</sup>。维基百科是最大的 MediaWiki 部署之一，运行在 MariaDB 上<sup>[10](https://www.techradar.com/pro/software-services/how-to-use-mediawiki-to-create-and-run-your-own-wiki-page)</sup>。

## References

1. [Open Source timeline (MySQL-MariaDB story), MariaDB.org](https://mariadb.org/wp-content/uploads/2019/11/MySQL-MariaDB-story.pdf)
2. [About MariaDB Server, MariaDB.org](https://blog.mariadb.org/about/)
3. [MySQL to MariaDB Compatibility Matrix, MariaDB Documentation](https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/migrating-to-mariadb/moving-from-mysql/mysql-to-mariadb-compatibility-matrix)
4. [About the MariaDB Foundation, MariaDB Documentation](https://mariadb.com/docs/server/clients-and-utilities/server-client-software/mariadb-foundation)
5. [Storage Engines Overview, MariaDB Documentation](https://mariadb.com/docs/server/server-usage/storage-engines/storage-engines-storage-engines-overview)
6. [InnoDB Introduction, MariaDB Documentation](https://mariadb.com/docs/server/server-usage/storage-engines/innodb/innodb-storage-engine-introduction)
7. [Replication Overview, MariaDB Documentation](https://mariadb.com/docs/server/ha-and-performance/standard-replication/replication-overview)
8. [The Difference Between MariaDB vs. MySQL, MariaDB](https://mariadb.com/database-topics/mariadb-vs-mysql/)
9. [MariaDB Server 12.3, 11.8, 11.4 and 10.11 – Q3 2026 Maintenance Releases, and Goodbye 10.6, MariaDB.org](https://mariadb.org/mariadb-server-12-3-11-8-11-4-and-10-11-q3-2026-maintenance-releases-and-goodbye-10-6/)
10. [How to use MediaWiki to create and run your own Wiki page, TechRadar](https://www.techradar.com/pro/software-services/how-to-use-mediawiki-to-create-and-run-your-own-wiki-page)
11. [MariaDB foundation trademark agreement, Planet MySQL](https://planet.mysql.com/entry/?id=2109527)
12. [Contributions, our lifeblood, MariaDB.org](https://mariadb.org/contributions-our-lifeblood/)
13. [By-Laws of MariaDB Foundation, MariaDB.org](https://mariadb.org/bylaws/)
14. [Aria FAQ, MariaDB Documentation](https://mariadb.com/docs/server/server-usage/storage-engines/aria/aria-faq)
15. [State of MariaDB 2025 Survey Report, MariaDB.org](https://mariadb.org/survey/2025-report/)
16. [Incompatibilities and Feature Differences Between MariaDB 10.7 and MySQL 8.0, MariaDB Documentation](https://mariadb.com/docs/release-notes/community-server/about/compatibility-and-differences/incompatibilities-and-feature-differences-between-mariadb-and-mysql-unmaint/incompatibilities-and-feature-differences-between-mariadb-10-7-and-mysql-8)
17. [Migrations to MariaDB from MySQL Now Easier Than Ever: Open Source MariaDB Migrator Tool Reaches GA, MariaDB](https://mariadb.com/resources/blog/migrations-to-mariadb-from-mysql-now-easier-than-ever-open-source-mariadb-migrator-tool-reaches-ga/)
18. [MariaDB vs MySQL Comparison Guide: Enterprise Features & Security, MariaDB](https://mariadb.com/reference/mariadb-vs-mysql-comparison-guide-enterprise-features-security-2026/)
19. [2026 – MySQL Ecosystem Performance Benchmark Report, Percona](https://www.percona.com/blog/2026-mysql-ecosystem-performance-benchmark-report/)
20. [Known issues and limitations for RDS for MariaDB, Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.Limitations.html)

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

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › 数据库与数据系统 › 数据库引擎与系统 › 关系数据库引擎

Copyright 2026 Edgepedia

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

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

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