Installing MySQL 5.7 on CentOS 6/RedHat EL 6/Fedora with Yum

Standard

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/

MySQL Yum downloads page

MySQL Yum downloads page

Copy the download link:

MySQL 5.7 Yum repo download link

MySQL 5.7 Yum repo 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)

wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
md5sum mysql57-community-release-el6-7.noarch.rpm 
rpm -ivh mysql57-community-release-el6-7.noarch.rpm
mysql 5.7 centos 6 yum repo

mysql 5.7 centos 6 yum repo

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
installing mysql 5.7 yum command

installing mysql 5.7 with yum command

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!');
MySQL 5.7 default password login

MySQL 5.7 default password login

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.

Facebooktwitterredditpinterestlinkedinmail

About Prashanth Goriparthi

Data Janitor

2 Comments

Leave a Reply

* Captcha [Please fill/solve below] : * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.