How to install MySQL8 on Amazon Linux2
This tutorial explains the steps to install MySQL8 on Amazon Linux2 EC2 instance.
Step1: Login to the instance via ssh and switch as root user.
Step2: Add MySQL yum repository.
#yum install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
Step3: Install MySQL.
#yum install mysql-community-server
Step4: Enable MySQL to run in startup.
#systemctl enable mysqld
Step5: Start MySQL service.
#systemctl start mysqld
Step6: Collect the auto generated root password from MySQL log file.
#grep 'temporary password' /var/log/mysqld.log
Step7: Complete the post installation setup.
#mysql_secure_installation
Follow the standard input requirements and complete the installation.
That's all…