0
点赞
收藏
分享

微信扫一扫

MariaDB VS MySQL 2023年技术总结

圣杰 2023-12-29 阅读 37

专业评测报告来源于Percona,这里摘要关键部分展示二者区别。

https://www.percona.com/blog/mysql-vs-mariadb-reality-check/

MariaDB vs. MySQL vs Percona Server for MySQL:一般比较

MariaDB、MySQL 和 Percona Server for MySQL 都是非常流行的关系数据库管理系统。在下图中,我们将讨论它们之间的一般协议、功能、可扩展性、安全性和可用性。阅读图表时应注意的事项:

  • MariaDB是MySQL的社区开发分支
  • MySQL归甲骨文所有
  • Percona Server for MySQL 是注重性能的 MySQL 变体,免费提供额外的优化和可扩展性功能

MariaDB Server

MySQL

Percona Server for MySQL*

Protocols

MySQL protocol, MariaDB Server extensions

MySQL protocol over port 3306, X Protocol over port 33060

MySQL protocol over port 3306, X Protocol over port 33060

Community – Source Code

Open Source

Open Source

Open Source

Community – Development

Open Source, contributions via the new BSD license or signing the MariaDB Contributor Agreement (MCA)

Open Source, contributions via signing the Oracle Contributor Agreement (OCA)

Open Source

Community – Collaboration

Mailing list, bugs system (Jira), IRC channel

Mailing list, forums, bugs system

Mailing list, forums, bugs system (Jira, Launchpad)

Core – Replication

MariaDB Server replication, with own GTID, compatible only if MariaDB Server is a slave to MySQL, not vice versa

MySQL replication with GTID

MySQL replication with GTID

Core – Routing

MariaDB MaxScale (Business Source License)

MySQL Router (GPLv2)

ProxySQL (GPLv3)

Core – Partitioning

Standard, with extra engines like SPIDER/CONNECT that offer varying levels of support

Standard

Standard

Tool – Editing

Webyog’s SQLYog for Microsoft Windows (MySQL Workbench notes an incompatible server)

MySQL Workbench for Microsoft Windows, macOS, and Linux

MySQL Workbench for Microsoft Windows, macOS, and Linux

Tool – Monitoring

Webyog’s Monyog

MySQL Enterprise Monitor

Percona Monitoring & Management (PMM) (100% open source)

Scalability – Client Connections

Open Source Threadpool

MySQL Enterprise Threadpool

Open Source Threadpool with support for priority tickets

Scalability – Clustering

MariaDB Enterprise Cluster (based on Galera Cluster)

MySQL Group Replication

MySQL Group Replication, Percona XtraDB Cluster (based on a further engineered Galera Cluster)

Security – Encryption

Tablespace and table data-at-rest encryption. Amazon KMS, binlog/redo/tmp file with Aria tablespace encryption

Tablespace data-at-rest encryption. Amazon KMS, Oracle Vault Enterprise Edition

Tablespace data-at-rest encryption with Keyring Vault plugin

Security – Data Masking

MariaDB MaxScale data masking

ProxySQL data masking

ProxySQL data masking

Security – Firewall

MariaDB MaxScale Firewall

MySQL Enterprise Firewall

ProxySQL Firewall

Security – Auditing

MariaDB Audit Plugin (OSS)

MySQL Enterprise Audit Plugin

Percona Audit Plugin (OSS)

Analytics

MariaDB ColumnStore

No

ClickHouse

SQL – Common Table Expressions

Present in MariaDB Server 10.2

In-development for MySQL 8.0 (now a release candidate)

In-development for MySQL 8.0 (now a release candidate)

SQL – Window Functions

Present in MariaDB Server 10.2

In-development for MySQL 8.0 (now a release candidate)

In-development for MySQL 8.0 (now a release candidate)

Temporal – Log-based rollback

In development for MariaDB Server 10.3

No

No

Temporal – system versioned tables

In development for MariaDB Server 10.3

No

No

JSON

No JSON Data Type, 26 functions

JSON Data type, 21 functions

JSON Data type, 21 functions

Official client connectors

C (libmariadbclient), Java, ODBC

C (libmysqlclient), Java, ODBC, .NET, Node.js, Python, C++, mysqlnd for PHP

C (libmysqlclient), Java, ODBC, .NET, Node.js, Python, C++, mysqlnd for PHP

Usability – CJK Language support

No

Gb18030, ngram & MeCab for InnoDB full-text search

Gb18030, ngram & MeCab for InnoDB full-text search

Monitoring – PERFORMANCE _SCHEMA

Instrumentation from MySQL 5.6, sys schema not included

Thorough instrumentation in 5.7, sys schema included

Thorough instrumentation in 5.7, sys schema included

Security – Password authentication

ed25519 (incompatible with sha256_password)

sha256_password (with caching_sha2_password in 8.0)

sha256_password (with caching_sha2_password in 8.0)

Security – Secure out of the box

No

validate_password on by default, to choose a strong password at the start

validate_password on by default, to choose a strong password at the start

Usability – Syntax differences

SHOW EXPLAIN FOR

EXPLAIN FOR CONNECTION

EXPLAIN FOR CONNECTION

Optimiser – Optimiser Tracing

No

Yes

Yes

Optimiser – Optimiser Hints

No

Yes

Yes

DBA – Super readonly mode

No

Yes

Yes

Security – Password expiry

No

Yes

Yes

Security – Password last changed? Password lifetime?

No

Yes

Yes

Security – VALIDATE_PASSWORD _STRENGTH()

No

Yes

Yes

Security – ACCOUNT LOCK/UNLOCK

No

Yes

Yes

Usability – Query Rewriting

No

Yes

Yes

GIS – GeoJSON & GeoHash functionality

Incomplete

Yes

Yes

Security – mysql_ssl_rsa_setup

No (setup SSL connections manually)

Yes

Yes

MySQL Utilities

No

Yes

Yes

Backup locks

No

No (in development for 8.0)

Yes

Usability – InnoDB memcached interface

No

Yes

Yes

支持生态系统和工具

Purpose

MySQL

Percona Server for MySQL

MariaDB Server

Monitoring

MySQL Enterprise Monitor

Percona Monitoring & Management (PMM) (100% open source)

Webyog Monyog

Backup

MySQL Enterprise Backup

Percona XtraBackup

MariaDB Backup (fork of Percona XtraBackup)

SQL Management

MySQL Workbench

MySQL Workbench

Webyog SQLyog

Load Balancing & Routing

MySQL Router

ProxySQL

MariaDB MaxScale

Database Firewall

MySQL Enterprise Firewall

ProxySQL

MariaDB MaxScale

常见问题

1.MariaDB 和 MySQL 哪个更好?

选择 MariaDB 还是 MySQL 取决于您的具体要求和使用情况。两者都很流行,提供类似的核心功能。MariaDB可提高大型数据集的性能,并增强安全功能。另一方面,MySQL受益于庞大的用户群和社区,在可靠性和稳定性方面有着良好的记录。

2.MariaDB和MySQL在性能上有什么区别吗?

MariaDB和MySQL之间的性能差异通常很小,但具体的工作负载、数据库配置和您的数据库需求将决定哪种选择最适合您。为了做出正确的选择,更重要的是关注性能以外的差异,如功能、支持和兼容性。

3.MariaDB是否会取代MySQL?

虽然MariaDB越来越受欢迎,但它并没有取代MySQL成为首选数据库。MariaDB和MySQL仍被大大小小的公司用于各种应用中。

4.是否有一些特定的用例,MariaDB比MySQL更受青睐,反之亦然?

对于处理大型数据集和复杂工作负载的应用来说,MariaDB是一个很好的选择。相比之下,MySQL则是需要多种工具和集成、希望得到广泛采用和社区支持的用户的首选。

5.MariaDB与为MySQL开发的应用程序兼容吗?

是的,作为MySQL的分叉,MariaDB与为MySQL开发的应用程序高度兼容。


举报

相关推荐

0 条评论