How to Install Latest MySQL 5.7.9 on RHEL/CentOS 7/6/5 and Fedora 23/22/21

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

68 Responses

  1. Anne Shanks says:

    Thanks for this. It was very helpful to me.

    I followed these instructions installed and secured then discovered that
    wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm

    Also downloads

    Is -9 better?

    I am on an enterprise RehHat Rhel6 server and not very mysql experienced.

    yum update mysql-server say “not Installed”
    Does not see the community editions repo sees our subscription satellite Server repo.

    Maybe this will work
    redscarf # yum update mysql-community-server.x86_64
    say no updates available does not say “available but not installed”

    I had previously downloaded mysql57-community-release-el6-9.noarch.rpm from the oracle support site but was having trouble getting install steps.

    Seems that is identical to what you get with
    wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm

    It was from https://dev.mysql.com/downloads/repo/yum/mysql57-community-release-el6-9.noarch.rpm downloaded in a browser because I had to login to Oracle support with my work support ID to get that download.

    I guess I should uninstall that -7 and try the -9?

    MY rhel 6 enterprise severs have
    myhost # mysql –version
    mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
    myhost # cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 6.8 (Santiago)

  2. Jayaprakash Singamsetty says:

    I am planning to upgrade Mysql 5.5 to 5.7 in my RHEL machine, I have application running on it after upgrade i can’t able to see the application connecting to application..

  3. Doug Marshall says:

    No clue what is happening. It can’t find the sock and I can’t start it. I either get that error or MySQL Daemon failed to start

    And I can’t find mysql.sock either

    • Ravi Saive says:

      @Doug,

      Find the mysql.sock location with the help of following command:

      # find / -type s | grep mysqld.sock
      

      Next remove the mysql.sock and restart the service as shown:

      # service mysqld stop
      # rm -rf /var/lib/mysql/*
      # service mysqld start
      # mysql_secure_installation
      
  4. Rufus says:

    nice documented and easily understand, thank you very much

  5. Debbie Lawton says:

    MySQL is a prereq for RTM (IBM product) and I see in the rtm conf it is looking for the /etc/init.d/mysqld. I have the SQL started (THANK YOU for your wonderful guide) and am seeing expected results but am not sure why the /etc/init.d/mysqld is not starting.

  6. Yusuf says:

    Quite helpful

  7. meet vora says:

    very well documented and easily understandable for beginners, thank you very much for wonderful tutorial

  8. ams-jamali says:

    installed Mysql but resceived error;
    [root@miet ~]# service mysqld status
    mysqld (pid 327) is running…
    [root@miet ~]# mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 24
    Server version: 5.7.13

    Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

    mysql> show databases;
    ERROR 1820 (HY000): Unknown error 1820

    How to solve?

    • Ravi Saive says:

      @Jamali,

      MySQL 5.6 added one strong feature is auto encrypted password creation when mysql first time installed on Linux box and you can find the password in mysql error log file, located at /var/log/mysqld.log. Once you are connected to mysql using encrypted password you will get such error until unless mysql root password is reset again.

      mysql> SET PASSWORD = PASSWORD('new_password');
      mysql> use mysql;
      mysql> show databases;
      
      • ams-jamali says:

        [root@miet ~]# SET PASSWORD=PASSWORD(‘mysql’);
        -bash: syntax error near unexpected token `(‘

        • ams-jamali says:

          ..sorry ,i typed in prompt here is the output

          mysql> set PASSWORD=PASSWORD(‘mysql’);
          ERROR 1819 (HY000): Unknown error 1819

          • Ravi Saive says:

            @Jamali,

            I think some issue with your installation, try to re-install MySQL again…

  1. August 21, 2016

    […] How to Install Latest MySQL 5.7.9 on RHEL/CentOS 7/6/5 and Fedora 23/22/21 […]

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 150K+ Linux Users
  1. 100,756
  2. 5,113
  3. 36,418

Enter your email to get latest Linux Howto's