Install MariaDB 10.5 on CentOS 8

MariaDB 10.5 is the current stable series of MariaDB. It is an evolution of MariaDB 10.4 with several entirely new features not found anywhere else and with backported and reimplemented features from MySQL.

#1 – Create a repo
Here is your MariaDB YUM/DNF repository entry for CentOS. Copy and paste it into a file under /etc/yum.repos.d/mariadb.repo

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

#2 – Install MariaDB 10.5

We will only use the mariadb repo while running installation command.

dnf install MariaDB-server -y --disablerepo=* --enablerepo=mariadb

Last metadata expiration check: 0:11:45 ago on Sat 22 Aug 2020 04:37:16 AM IST.
Dependencies resolved.
================================================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================================================
Installing:
MariaDB-server x86_64 10.5.5-1.el8 mariadb 27 M
Installing dependencies:
MariaDB-client x86_64 10.5.5-1.el8 mariadb 13 M
MariaDB-common x86_64 10.5.5-1.el8 mariadb 87 k
MariaDB-shared x86_64 10.5.5-1.el8 mariadb 116 k
galera-4 x86_64 26.4.4-1.rhel8.0.el8 mariadb 13 M

Transaction Summary
================================================================================================================================================================
Install 5 Packages

Total download size: 53 M
Installed size: 205 M
Downloading Packages:
(1/5): MariaDB-common-10.5.5-1.el8.x86_64.rpm 41 kB/s | 87 kB 00:02
(2/5): MariaDB-shared-10.5.5-1.el8.x86_64.rpm 137 kB/s | 116 kB 00:00
(3/5): MariaDB-client-10.5.5-1.el8.x86_64.rpm 763 kB/s | 13 MB 00:17
(4/5): MariaDB-server-10.5.5-1.el8.x86_64.rpm 1.0 MB/s | 27 MB 00:25
(5/5): galera-4-26.4.4-1.rhel8.0.el8.x86_64.rpm 341 kB/s | 13 MB 00:40
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.2 MB/s | 53 MB 00:43
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: MariaDB-shared-10.5.5-1.el8.x86_64 1/5
Installing : MariaDB-shared-10.5.5-1.el8.x86_64 1/5
Running scriptlet: MariaDB-shared-10.5.5-1.el8.x86_64 1/5
Running scriptlet: MariaDB-common-10.5.5-1.el8.x86_64 2/5
Installing : MariaDB-common-10.5.5-1.el8.x86_64 2/5
Running scriptlet: MariaDB-common-10.5.5-1.el8.x86_64 2/5
Running scriptlet: MariaDB-client-10.5.5-1.el8.x86_64 3/5
Installing : MariaDB-client-10.5.5-1.el8.x86_64 3/5
Running scriptlet: MariaDB-client-10.5.5-1.el8.x86_64 3/5
Running scriptlet: galera-4-26.4.4-1.rhel8.0.el8.x86_64 4/5
Installing : galera-4-26.4.4-1.rhel8.0.el8.x86_64 4/5
Running scriptlet: galera-4-26.4.4-1.rhel8.0.el8.x86_64 4/5
Running scriptlet: MariaDB-server-10.5.5-1.el8.x86_64 5/5
Installing : MariaDB-server-10.5.5-1.el8.x86_64 5/5
Running scriptlet: MariaDB-server-10.5.5-1.el8.x86_64 5/5
Verifying : MariaDB-client-10.5.5-1.el8.x86_64 1/5
Verifying : MariaDB-common-10.5.5-1.el8.x86_64 2/5
Verifying : MariaDB-server-10.5.5-1.el8.x86_64 3/5
Verifying : MariaDB-shared-10.5.5-1.el8.x86_64 4/5
Verifying : galera-4-26.4.4-1.rhel8.0.el8.x86_64 5/5
Installed products updated.

Installed:
MariaDB-client-10.5.5-1.el8.x86_64 MariaDB-common-10.5.5-1.el8.x86_64 MariaDB-server-10.5.5-1.el8.x86_64 MariaDB-shared-10.5.5-1.el8.x86_64
galera-4-26.4.4-1.rhel8.0.el8.x86_64

Complete!

#3 – Start, enable and check the service status

systemctl start mariadb ; systemctl enable mariadb ; systemctl status mariadb


Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
● mariadb.service - MariaDB 10.5.5 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: active (running) since Sat 2020-08-22 04:51:32 IST; 388ms ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 4399 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 12 (limit: 7377)
Memory: 92.8M
CGroup: /system.slice/mariadb.service
└─4399 /usr/sbin/mariadbd

Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Note] Plugin 'FEEDBACK' is disabled.
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Note] InnoDB: Buffer pool(s) load completed at 200822 4:51:32
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Warning] Failed to create a socket for IPv6 '::': errno: 97.
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Note] Server socket created on IP: '0.0.0.0'.
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Note] Reading of all Master_info entries succeeded
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Note] Added new Master_info '' to hash table
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: 2020-08-22 4:51:32 0 [Note] /usr/sbin/mariadbd: ready for connections.
Aug 22 04:51:32 server.the-d2.com mariadbd[4399]: Version: '10.5.5-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
Aug 22 04:51:32 server.the-d2.com systemd[1]: Started MariaDB 10.5.5 database server.

#4 – Initial Configuration

mysql_secure_installation

#5 – Check version

mysql -V
mysql Ver 15.1 Distrib 10.5.5-MariaDB, for Linux (x86_64) using readline 5.1

OR Login to MySQL and run below command:

MariaDB [(none)]> select version();
+----------------+
| version() |
+----------------+
| 10.5.5-MariaDB |
+----------------+
1 row in set (0.000 sec)

MariaDB [(none)]>

 

 

 

 

Leave a Reply