Skip to content

Instantly share code, notes, and snippets.

@saurabh47
Last active May 24, 2020 17:09
Show Gist options
  • Save saurabh47/49fa76e13040684a3ba426a7125993f2 to your computer and use it in GitHub Desktop.
Save saurabh47/49fa76e13040684a3ba426a7125993f2 to your computer and use it in GitHub Desktop.
MYSQL 8 server setup on EC2 Linux

MYSQL 8 Database Setup On AWS EC2 LINUX

  1. Download RPM file
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
  1. Install MYSQL server
sudo yum install mysql-community-server
  1. Start the MYSQL service
sudo service mysqld start
  1. Check the status of server
sudo service mysqld 
  1. Get the temporary password setup by the MYSQL server
sudo grep 'temporary password' /var/log/mysqld.log
  1. Login to MYSQL
mysql -uroot -p

7.Change the password

ALTER USER 'root'@'localhost’ IDENTIFIED WITH mysql_native_password BY ’NewPassword’;
  1. For password based authentication you need identified with mysql_native_password & for applying changes privileges need to be flushed.
flush privileges;

Enjoy :)

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment