Question: 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)

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.
You can install it by just 1 command
sudo yum install mysql 

Then follow AWS documentation on how to connect rds to mysql