Installation procedure for MYSQL on CentOS 7
1) To Install Mysql visit :-
https://dev.mysql.com/downloads/repo/yum/
2) Locate the desired version and update it in the link below :-
wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
3) Verify the integrity by md5sum
md5sum mysql80-community-release-el7-1.noarch.rpm
Its output should be similar to :-
739dc44566d739c5d7b893de96ee6848 mysql80-community-release-el7-1.noarch.rpm
Compare this with value given on the site so as to check file was not corrupted or changed.
4) Install the package
sudo rpm -ivh mysql80-community-release-el7-1.noarch.rpm
5) Install MYSQL server
sudo yum install mysql-server
6) Start MYSQL server and check if its running
sudo systemctl start mysqld
sudo systemctl status mysqld
Temporary passowrd is generated during installation locate it in mysqld.log
sudo grep 'temporary password' /var/log/mysqld.log
7) Configure MYSQL
sudo mysql_secure_installation
This will ask you for default root password and will ask to change it afterwards.
8) Login to MYSQL server
mysql -u root -p