Skip to content
Home ยป How to Install the Latest Version of MariaDB on the Linux Server?

How to Install the Latest Version of MariaDB on the Linux Server?

MariaDB is one of the widely used open-source database applications that was first released in 2009. This database was named MySQL, but in 2008, Sun Microsystems acquired MySQL, so the MySQL database maker made Mariadb as the free version. But sometimes when you install MariaDB on your Linux server, your MariaDB version is not the latest version.

 

Problem

How to install the latest version of MariaDB on the Linux server?

 

Solution

As of this writing, the latest MariaDB version is 11.7.2. Use the command below to create a MariaDB repository on your Linux server:

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash

 

and the process will occur as shown image below:

Install the Latest Version of the MariaDB
Running the command

 

After that, install MariaDB based on the Linux server distribution that you use:

Redhat-Based Version (Centos, Almalinux, Rockylinux)

yum install MariaDB-server MariaDB-client MariaDB-backup

 

Ubuntu/Debian

sudo apt-get install mariadb-server mariadb-client mariadb-backup

 

OpenSUSE

sudo zypper install MariaDB-server MariaDB-client MariaDB-backup

 

After MariaDB has been installed on your Linux server, use the command below to see the MariaDB version that you have installed:

mysql -V
Checking the MariaDB version

 

After that, use the command below to see the status of MariaDB:

systemctl status mariadb
Display the status of service

 

You can see the image above that MariaDB’s service is on. However, if MariaDB’s service is still not on, use the command below to turn on the MariaDB service:

systemctl start mariadb

To run MariaDB after turning on the server, use the command below:

systemctl enable mariadb
Enable MariaDB

After that, to MariaDB becomes safe, use one of the commands below:

sudo mariadb_secure_installation

OR

sudo mariadb-secure-installation

 

Then there will be a display as in the image below:

Running the command

 

By default, there is no password when accessing MariaDB so press the Enter button to continue the process. After that, you must answer the questions displayed including creating a new password as shown below:

Write the password

 

Then, continue until the process is finished. The next article will explain how to manage a database and its table(s) in MariaDB.

 

Note

Use the command below if you want to see the option when you run the command to make a repo:

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --help

 

If you want to install a certain version of MariaDB, for example, version 11.4, then you can use the command below:

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version="mariadb-11.4"

 

If you want to download a script, use the command below:

curl -LO https://r.mariadb.com/downloads/mariadb_repo_setup

 

References

mariadb.com
devopscube.com

image_pdfimage_print
Visited 42 times, 1 visit(s) today
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *