Skip to content

Instantly share code, notes, and snippets.

@ebc-2in2crc
Created April 3, 2021 11:22
Show Gist options
  • Save ebc-2in2crc/d5c0976b4f039764e780049822acc329 to your computer and use it in GitHub Desktop.
Save ebc-2in2crc/d5c0976b4f039764e780049822acc329 to your computer and use it in GitHub Desktop.
MySQL 5.7 Installation on Amazon Linux 2 in AWS EC2.
#!/bin/bash
set -x
sudo yum update -y
sudo yum remove -y mariadb-libs
sudo yum install -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
yum list installed | grep mysql
yum repolist all | grep -E "mysql[0-9]+-community/x86"
sudo yum-config-manager --disable mysql80-community
sudo yum-config-manager --enable mysql57-community
yum repolist all | grep -E "mysql[0-9]+-community/x86"
sudo yum install -y mysql-community-server
sudo systemctl start mysqld
systemctl status mysqld.service
sudo systemctl enable mysqld
mysql --version
sudo grep 'temporary password' /var/log/mysqld.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment