1. Install MySQL yum repository
Head over here and get the url for yum repo to be deployed in your server: http://dev.mysql.com/downloads/repo/yum/
Copy the download link:
Now that you have the download link, wget get the repo rpm and check file checksum to make sure that rpm is downloaded with out errors. Make a note of checksum from first picture above (Checksum validation is optional)
rpm -ivh mysql57-community-release-el6-7.noarch.rpm
2. Install MySQL 5.7 Server and client libraries
Now that you have installed mysql 5.7 yum repo, you can start install mysql server and client libraries.
yum install -y mysql-community-client mysql-community-server
3. Start MySQL 5.7 Server and connect to it !
Start MySQL 5.7 service
service mysqld start
And find initial mysql 5.7 root password from log file
grep -i temporary /var/log/mysqld.log
Login into MySQL 5.7 using password you got from temporary password that you searched from above
mysql -uroot -p
Only command MySQL 5.7 is going to let you run once you login with your default password is password command
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Yourpassword1!');
That’s it, you have successfully installed MySQL 5.7 server on CentOS 6/Redhat EL6/Fedora. Open some firewall rules if needed and create users to access your database.