Steps to install mysql 5.7 on Amazon Linux 2
- Install Extra Packages for Enterprise Linux (EPEL)
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
(you can alternatively use sudo amazon-linux-extras install epel) - Add mysql yum repository
sudo yum install https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm - sudo yum install mysql-community-server
- sudo systemctl start mysqld
- sudo systemctl enable mysqld (to start it at boot time)