MariaDB is a relational database management system (RDBMS) that originated as a fork of MySQL. It was created by Michael “Monty” Widenius, the original developer of MySQL, in 2009. The motivation behind creating MariaDB was concerns over Oracle Corporation’s acquisition of MySQL and the potential implications it could have on the open-source nature and future development of MySQL.
Intro to MariaDB
MariaDB is an open-source relational database management system (RDBMS) that originated as a fork of MySQL in 2009. Designed to be a drop-in replacement for MySQL, MariaDB offers a variety of advanced features and performance improvements, coupled with backward compatibility. It supports multiple storage engines, integrates with Galera Cluster for synchronous multi-master replication, and emphasizes security with features like role-based access controls and data masking. With its active community development and commitment to open source (using the GPL v2 license), MariaDB stands as a prominent choice for modern database operations.
MariaDB Quick Facts
- Origin: MariaDB was developed in 2009 by Michael “Monty” Widenius, the original creator of MySQL, as a direct response to concerns over Oracle Corporation’s acquisition of MySQL.
- Backward Compatibility: MariaDB is designed to be a drop-in replacement for MySQL, ensuring that existing MySQL tools and software can seamlessly connect to a MariaDB server.
- Storage Engines: MariaDB supports a wide range of storage engines, including the Aria, InnoDB, MyRocks, and ColumnStore, offering flexibility based on specific use-case requirements.
- Galera Cluster Integration: MariaDB comes with built-in support for Galera Cluster, allowing synchronous multi-master replication for high availability and fault tolerance.
- License: Unlike some other RDBMS solutions, MariaDB remains committed to open source and is distributed under the GPL v2 license, ensuring its availability to the wider community.
Maria DB Core Features:
- 100% Open Source: MariaDB is open source and uses the GPL v2 license.
- Storage Engines: MariaDB supports a wide variety of storage engines, ensuring the flexibility to select an engine that meets specific use case requirements.
- Galera Cluster Integration: Provides synchronous multi-master replication.
- Security: Offers advanced security features like role-based access controls, data masking, and data-at-rest encryption.
- ColumnStore: A columnar storage engine optimized for big data analytics.
- Backwards Compatibility with MySQL: MariaDB is designed to be a drop-in replacement for MySQL. This means that software and tools which interact with MySQL can seamlessly connect to a MariaDB server.
- Active Community Development: MariaDB benefits from a very active community which ensures continuous improvement and regular updates.
- High Performance: Several improvements over MySQL make MariaDB a high-performance choice for database operations.
- Enterprise Features: MariaDB offers features in its open source edition which might only be available in the enterprise editions of other databases.
MariaDB Versus MySQL
MariaDB is better understood by comparing it to another popular database management system: MySQL.
The chart below compares the core features of MariaDB to the MySQL alternative.
Getting Started with MariaDB
If you’re looking to get started using MariaDB, follow these steps:
Step 1: Installation
Install MariaDB based on your operating system:
sudo apt-get update sudo apt-get install mariadb-server
For CentOS/Red Hat:
bash sudo yum update sudo yum install mariadb-server
MariaDB is most commonly used with these Linux operating systems, but it can be installed on many other versions of Linux as well as on Windows, MacOS, BSD, Solaris, and as a Docker image. To install MariaDB in an environment other than those listed here, you’ll need to consult the specific installation instructions for that operating system.
Step 2: Secure Installation
After installing, it’s recommended to run a security script to remove unsafe defaults:
Step 3: Start/Stop MariaDB Server
Use the appropriate system commands to manage the MariaDB server:
- Start MariaDB:
sudo systemctl start mariadb
- Stop MariaDB:
sudo systemctl stop mariadb
- Enable at Boot:
bash sudo systemctl enable mariadb
Step 4: Accessing MariaDB
Access MariaDB with the following command:
mysql -u root -p
Enter the root password when prompted.
Step 5: Create a Database & User
Within the MariaDB shell, you can create a new database and user. For instance, to create a database named “mydatabase” and a user “myuser” with the password “mypassword”:
CREATE DATABASE mydatabase; GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'localhost' IDENTIFIED BY 'mypassword'; FLUSH PRIVILEGES;
That’s it! You’ve now installed MariaDB and made some basic configurations. Dive deeper by exploring MariaDB’s official documentation to learn more about its rich features and capabilities.
MariaDB, while born out of a fork from MySQL, has grown to establish its identity in the world of relational databases. Its commitment to open source, combined with performance improvements and advanced features, make it an attractive choice for many enterprises and individual developers alike. Whether you’re migrating from MySQL or starting fresh, MariaDB offers a robust platform for your data management needs.