download repo file and keys

download the repo file and install the keys:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

verify the repo file:
cat /etc/yum.repos.d/mariadb.repo

Install client and compatibility libraries

yum install mariadb


==================================================
Package Arch Version Repository Size
==================================================
Installing:
MariaDB-client x86_64 10.5.9-1.el7.centos mariadb-main 13 M
MariaDB-compat x86_64 10.5.9-1.el7.centos mariadb-main 2.2 M
replacing mariadb-libs.x86_64 1:5.5.68-1.el7
Installing for dependencies:
MariaDB-common x86_64 10.5.9-1.el7.centos mariadb-main 81 k

Transaction Summary
==================================================
Install 2 Packages (+1 Dependent package)

install server package

yum install MariaDB-server

==================================================
Package Arch Version Repository Size
==================================================
Installing:
MariaDB-server x86_64 10.5.9-1.el7.centos mariadb-main 26 M
Installing for dependencies:
galera-4 x86_64 26.4.7-1.el7.centos mariadb-main 9.1 M
socat x86_64 1.7.3.2-2.el7 base 290 k

Transaction Summary
==================================================
Install 1 Package (+2 Dependent packages)


install shared libraries and client (if not installed)

yum install MariaDB-client MariaDB-shared

install development package

yum install MariaDB-devel

installs headers and libraries for development.

comes with a config utility which can be used directly in makefile:

mysql_config --cflags --libs
-I/usr/include/mysql -I/usr/include/mysql/mysql
-L/usr/lib64/ -lmariadb

Makefile:

CC=c++ -std=c++17
default: queryTable
createTable:createTable.cpp
${CC} -o $@ $@.cpp `mysql_config --cflags --libs`

queryTable:queryTable.cpp
${CC} -o $@ $@.cpp `mysql_config --cflags --libs`

start Mariadb server

[root@r02edge app]# systemctl start mariadb
[root@r02edge app]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@r02edge app]# systemctl status mariadb