Considering you have a running Red Hat Enterprise Linux (RHEL) instance, I'll provide the steps to install MySQL 8.0 in it as you want to use the latest and 8.0 is the latest.
Step 1: Install wget
Go to /home/ec2-user
sudo yum install wget
Step 2: Use wget to download the MySQL Yum repository.
Step 3: Now, install the mysql locally
sudo yum localinstall mysql80-community-release-el7-3.noarch.rpm
Step 4: Install MySQL community server
sudo yum install mysql-community-server
Step 5: Confirm your MySQL service status
sudo service mysqld status
Since you are facing issues while working on Amazon EC2 that's why the article on AWS EC2 will surely come in handy for you.