How to Install MariaDB on Ubuntu 22.04. In this guide, we discuss MariaDB and its features that are beneficial to individuals and organizations. After we navigate to steps how to install and interact with MariaDB.
In the era of globalization and modernization, databases are extremely important for effectively managing, storing, and retrieving data. To fulfill the same purpose, a popular open source MariaDB, which is a relational database management system (RDBMS) has been developed. MariaDB offers additional features such as faster speed and improved security as a drop in alternative for MySQL.
Since MariaDB is open source software, which means anyone downloads, uses and modifies it for free. Due to this, it becomes a viable choice for companies and organizations of all sizes because they are exempted from paying steep licensing fees and vendor lock in concerns.
Availability
All in all, MariaDB offers Master slavereplication features. This feature enables data to be replicated across many servers, guaranteeing that it is always accessible even in the case of a server failure. Moreover, it offers automated failover that enables the secondary server to take over in the event of a primary server failure without interfering with service.
High Performance
MariaDB is renowned for its outstanding scalability and performance. It is capable of handling millions of transactions per second and is built to manage massive, complicated databases. Supports a variety of storage engines, including InnoDB, MyRocks, and Aria. Each of which are customized for a particular task.
Since MariaDB is entirely compatible with MySQL, making it is simple to switch from MySQL to MariaDB without needing to make any changes to the application’s code. For this, it is a preferable option for businesses searching for a MySQL drop in replacement.
Community driven
The developers and contributors that work on MariaDB are passionate about building a better database system. This implies that the software is always evolving to cater to the needs of clients through updates, new features, and bug repairs.
The adoption of open source software by businesses and organizations is a rising trend worldwide. To help organizations make data driven decisions, the system is dedicated to enhancing its performance, securing features, and integrating with AI and ML technologies. So, MariaDB due to its simplicity, scalability, and dependability is well suited to meet the expanding needs of companies of all sizes. MariaDB continues to adapt and offer advanced solutions to assist organizations in managing their data efficiently and securely as the data landscape changes.
Also, it is natural to expect that demand for cloud based database management systems like MariaDB increases as more enterprises transfer their operations to the cloud.
In this section, we show you How to Install MariaDB on 22.04 Ubuntu. In addition, there is a guide after that to learn how to create a database, user and table in MariaDB.
Prerequisites
An Ubuntu 22.04 server is installed on your system.
A root user or a user with sudo privileges.
Update the System
Before doing anything, I would recommend to update and upgrade all the system packages to the latest version. Open your terminal and run the following command to update all the packages to the latest version.
apt update -y
apt upgrade -y
Once all the packages are in a newer version, please proceed to add the MariaDB repository.
By default, the MariaDB package is included in the Ubuntu default repository. However, it is a good idea to install the latest version of MariaDB from its official repository.
First, install all the necessary dependencies using the following command.
At this point, you are ready to install the latest version of the MariaDB server. Just run the following command to install both the MariaDB server and client package.
apt install mariadb-server mariadb-client
After the successful installation, verify the MariaDB version using the following command.
mariadb --version
You get the MariaDB version on the following screen.
To check the running status of the MariaDB service, run the following command.
systemctl status mariadb
This shows you the MariaDB status on the following screen.
Also start and stop the MariaDB service using the following command.
At this point, the MariaDB server is installed and running on your server. However, it is not secured yet. You will need to run the mysql_secure_installation script to secure the installation.
mysql_secure_installation
You will be asked to set a MariaDB root password as shown below:
Set your root password and press the Enter key. You will be asked to disable root login remotely.
Type Yes and press the Enter key. You are then asked to remove the anonymous user.
Type Yes and press the Enter key. You will be asked to remove the test database.
Type Yes and press the Enter key. Next reload the privileges table to secure the MariaDB installation.
Type Yes and press the Enter key to finish the process.
After installing and securing the MariaDB server. You also need to know how to interact with the MariaDB database. First, let’s connect to the MariaDB shell using the root user.
mysql -u root -p
After providing your MariaDB root password log into the MariaDB shell.
Finally, MariaDB efficiently stored and retrieved data due to its secure and scalable database management system. What is more, MariaDB offers advanced features such as high performance, high availability, and security, etc.
The system has the tools you need to complete the task, whether you’re in charge of a huge enterprise system or a modest personal database. Existing applications can be easily switched to MariaDB due to its compatibility with MySQL. So why not give it a shot and see what it can do for yourself!
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.
00votes
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.