Install MariaDB on CentOS 7

Run the following script to install MariaDB on CentOS 7.


# mysql installation should be done as root
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 1>&2
   exit 1

# install the server
yum install -y mariadb-server mariadb patch MySQL-python

# enable and start it
systemctl enable mariadb.service
systemctl start mariadb.service