Can someone provide steps to install mariadb on amazon linux 2? I am pretty new in linux, so a little detail will be greatly appreciated. I have seen few links to install maria db on centOs but not sure if the same works for Amazon linux 2
Can someone provide steps to install mariadb on amazon linux 2? I am pretty new in linux, so a little detail will be greatly appreciated. I have seen few links to install maria db on centOs but not sure if the same works for Amazon linux 2
If you use sudo yum install mariadb You'll get MariaDB version 5.5 which is an older version of MariaDB to get the latest version you will need to do the following.
sudo amazon-linux-extras enable lamp-mariadb10.2-php7.2=latestsudo yum install mariadb mariadb-serverNote This will not work if you have php >= 7.3. If this is the case you must uninstall php before doing the steps above, using sudo yum erase php-common
sudo amazon-linux-extras disable lamp-mariadb10.2-php7.2=latestNow mariadb is installed. I first tried to add centos 7 repo, but wasn't successful in getting it to install correctly.
Here you go:
sudo yum update -y
sudo yum install -y mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation
But I recommend you to install MariaDB from official repo for latest version by following instructions in this link.