Here is the snippet :
echo "# MariaDB 10.1 CentOS repository list - created 2017-02-07 08:50 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1" > /etc/yum.repos.d/MariaDB.repo
sudo yum install MariaDB-server MariaDB-client -y
sudo systemctl start mariadb
/usr/bin/mysql_secure_installation
# and follow the instruction
Source :
Server is powered by Digital Ocean, use my referral link to get $10 bonus.