Linux – amazon linux 2 ami – aws – How to install thesql in Amazon Linux 2

amazon ec2amazon-linuxlinuxMySQL

I am trying to install mysql in amazon linux 2 ami and am not able to do it.

sudo yum install mysql56-server -> doesn't work
amazon-linux-extras list -> doesn't list mysql

I do not want mariadb since I have more exposure to mysql (even if both are the same)

Best Answer

I got the answer myself. Follow the below steps:

sudo wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
sudo yum localinstall mysql57-community-release-el7-11.noarch.rpm 
sudo yum install mysql-community-server
systemctl start mysqld.service

The key is to add the source repo and then install since Amazon Linux 2 doesn't have the default repos in place already.

Related Topic