我要评分
获取效率
正确性
完整性
易理解

Introduction

This document describes how to deploy MariaDB on a Kunpeng server running openEuler or CentOS.

MariaDB Overview

MariaDB is a community-developed, commercially supported fork of MySQL, intended to remain free and open source software under the GNU General Public License (GPL). MariaDB intended to maintain high compatibility with MySQL, ensuring a drop-in replacement capability with MySQL APIs and commands. MariaDB also provides many better new features.

Figure 1 shows the MariaDB architecture.

Figure 1 MariaDB architecture

When MariaDB receives an SQL statement, the detailed implementation process is as follows:

  1. When a client connects to MariaDB, an authentication is performed based on the client's host name, user name, and password. Authentication can optionally be delegated to a plugin.
  2. If the login is successful, the client sends an SQL query to the server. The parser analyzes the SQL statements.
  3. The server checks whether the client has the permissions required for the requested resources.
  4. If the requested data is stored in the query cache, the result is immediately returned to the client.
  5. The optimizer locates the fastest execution strategy or query plan. It decides the tables to be read, indexes to be accessed, and temporary internal tables to be used. A good strategy can minimize access to drives and queuing operations.
  6. The storage engines read and write data and index files, and the caches speed up the read and write operations. The transactions and foreign keys are implemented at the storage engine layer.
  7. The storage engine at the physical layer manages and controls data, including data files, data, indexes, and caches, to make data management and read more efficient. Each table has an .frm file that contains table definitions.

The storage engines manage and store data in different ways, and support different features and performance. See the following examples:

  • MyISAM is suitable for read-intensive operations. It does not support transactions and supports full-text indexes.
  • InnoDB supports transactions, row locks, and foreign keys.
  • MEMORY stores data in memory.
  • CSV stores data in CSV format.

Programming language: C

Brief description: open source fork of MySQL

Recommended Software Version

MariaDB 10.3.8, MariaDB 10.3.9, MariaDB 10.4.17, and MariaDB 10.5.8.