How to install mariadb on amazon linux

I was able to install the MariaDB 5.5 CentOS repository list (created 2016-05-09 04:06 UTC).

Create the following file:

sudo vi /etc/yum.repos.d/maria.repo

Add the following contents to the file and save:

name = MariaDB
baseurl =

Then run the following commands:

sudo yum install -y MariaDB-server MariaDB-client
sudo /etc/init.d/mysql start

You should be all set. Run mysql -u root to log in.

You can secure MariaDB with the following command:

sudo mysql_secure_installation

More information:

Fortunately, I was trying to install MariaDB on Amazon Linux, myself. Just now I got it to work as above.

Currently in Amazon Linux 2 you can install it with yum:

yum install mariadb


yum install mariadb-server