How to install Mariadb via Yum repo on Centos 7

Run these command below:

vi /etc/yum.repos.d/MariaDB.repo

Once you have your MariaDB.repo entry, add it to a file under /etc/yum.repos.d/, (We suggest something like /etc/yum.repos.d/MariaDB.repo). An example MariaDB.repo file for CentOS 7 is:

name = MariaDB
baseurl =

The example file above includes a gpgkey line to automatically fetch the GPG key we use to sign the repositories. This key enables yum and rpm to verify the integrity of the packages it downloads.
and run:

yum update
yum install mariadb