How to install MySQL 5.7 on Amazon Linux

The Amazon Linux repositories contains Mariadb packages instead of MySQL by default.

This tutorial explains the steps to install MySQL 5.7 on Amazon Linux.

Step1: Login to the instance via ssh and switch to root user.

Step2: Install MySQL yum repository.

#rpm -Uvh

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.


Follow the standard input requirements and complete the installation.

That's all…

Leave a Reply