Install mariadb centos 8

Install mariadb centos 8

Hello colleagues.

In today's article, I will tell you about how to install MariaDB database management system on Linux. To date, the latest version of the DBMS is 10.6.5.

MariaDB is a fork of relational MySQL developed by the community under the GPL. MariaDB is compatible with applications that use MySQL, and the move to this DBMS is justified by the fact that MySQL is no longer being actively developed. This DBMS differs from MySQL in higher performance, new features and fewer errors. MariaDB has a built-in improved query optimizer, safer and faster replication, faster indexes for the data storage engine.

This article is suitable for engineers, system administrators and those who are just starting to get acquainted with MariaDB.

 

The content of the article:

  1. About the Server.
  2. Install the necessary packages.
  3. We generate the mariadb.repo repository.
  4. Install MariaDB.
  5. Open a port on the firewall.
  6. Start MariaDB.
  7. Results.

 

1. About the Server.

In today's article, I will use Centos 8. You can check which OS version you have with the command:

$. cat /etc/*release

IP: 192.168.2.227


 

2. Install the necessary packages.

In order to be able to download packages directly from the Linux operating system, you need to install the wget package, to install the package, use the command:

$. sudo dnf install wget


 

 

3. We generate the mariadb.repo repository.

Download the script from the site to generate the mariadb.repo repository.

$. sudo wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup

 

After downloading the script, check the hash code.

$. echo "c330d2755e18e48c3bba300a2898b0fc8ad2d3326d50b64e02fe65c67b454599  mariadb_repo_setup" | sha256sum -c -

 

After checking the hash code, you need to give the script the right to execute mariadb_repo_setup.

$. chmod +x mariadb_repo_setup

 

After granting the necessary rights, you need to run this script and it will already generate the repository.

$. sudo ./mariadb_repo_setup

 

So, after executing the script, the mariadb.repo file will be generated in the /etc/yum.repos.d directory.

That's it, the mariadb.repo repository has appeared, now you can install MariaDB.


 

4. Install MariaDB.

After generating the repository, we now run the installation of MariaDB itself. To install the DBMS, use the command:

$. sudo yum install mariadb

As you can see, only the client and the necessary dependencies for the DBMS were installed, but the database server itself was not.

 

To check which packages are installed, you need to use the command:

$. yum list installed | grep mariadb

As you can see, the client and libraries are installed, but the DBMS itself is not. Let's fix this.

 

To install the DBMS itself, use the command:

$. dnf install mariadb-server

 

Now let's check again which packages are installed, use the same command:

$. yum list installed | grep mariadb

Successfully! The Mariadb-server package is installed.


 

5. Open a port on the firewall.

The MariaDB DBMS uses port 3306 by default, although it can of course be changed, but we will not do this. Let's open a port on the Firewall.

$. firewall-cmd --zone=public --add-port=3306/tcp --permanent
$. firewall-cmd --reload


 

6. We start Mariadb.

To start MariaDB use the command:

$. service mariadb start

DBMS has been successfully launched!

 

The mysql utility is used to enter the database console. The default login is root and no password.

$. mysql -u root -p


 

7. Results.

Today we have successfully installed the database management system Mariadb version 10.6.5. In future articles, I will show many things that this monster can do.

 

Thank you all, I hope my article was of some help to you.

 

SIMILAR ARTICLES

MariaDB - ERROR Incorrect definition of table
MariaDB - ERROR Incorrect definition of table
MARIADB
Read more
Mariabackup backup - gzip compression
Mariabackup backup - gzip compression
MARIADB
Read more
Mariabackup error - Error writing file UNKNOWN errno 32 Broken pipe
Mariabackup error - Error writing file UNKNOWN errno 32 Broken pipe
MARIADB
Read more