Code:
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm // Add repository to your server
yum -y install mysql-community-server // Install MySQL Server
systemctl start mysqld.service // Start MySQL Service
systemctl enable mysqld.service // Enable MySQL Service for autoruns
grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log |tail -1 // Get MySQL created password
2192
/usr/bin/mysql_secure_installation // Configure and complete mysql installation