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

Download all articles in PDF format with our TecMint Content Subscription and Linux Support Services starting at $10 per month.

Support TecMint: Did you find this tutorial helpful?. Please help to keep it alive by donating. Every cent counts! - Donate Now

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...

49 Responses

  1. jeremy says:

    After completing this tutorial I cannot get my mysqld to start. I am getting this [ERROR] in /var/log/mysqld.log: unknown variable ‘myisam_recover=BACKUP’

    I am using centos 6.6. What do I do?

    • Ravi Saive says:

      @Jeremy,

      I think the issue with wrong Backtick ` placed at the beginning and end of the variable ‘myisam_recover=BACKUP’, try to use following variable with correct apostrophe.

      'myisam_recover=BACKUP'
      
  2. Vasil says:

    Many thanks for the tutorial

  3. Raja says:

    Hi,
    I am newbie to centos 7 and mysql server.
    I want to setup Multiple mysql server instances in same machine with mysql 5.7.10 on centos 7.

    The binary installation or Yum installation setup guide.

    Can you help me with step by step guide.
    Thanks in advance.

    • Ravi Saive says:

      @Raja,

      There isn’t any myth that newbies can’t setup complex things, everything is possible, just install first MySQL instance using yum command as shown in this guide and the second MySQL instance can be compiled and installed from source to a specific directory and use two different ports and configuration and that database path should be different. that’s it

  4. Raja says:

    Hi , I had setup the mysql community server 5.7.10 on centos 7 . But now i want to configure multiple mysql server instances on a centos 7 for mysqlfabric test. So can you help me step by step for running different port and multiple instances on centos 7. Thanks in advance.

  5. Pavol Bodnar says:

    Very nice article, it helps me lot. I have only one little suggestion:

    Please, add comment: Alan Labastida December 15, 2015 at 11:12 pm
    “MySQL v 5.7 or higher generates a temporary random password after installation and stored that in mysql error log file, located at /var/log/mysqld.log
    for an installation by the MySQL Yum repository on CentOS 7.

    use below command to see the password:
    shell > sudo grep ‘temporary password’ /var/log/mysqld.log”

    for step 5 part 9.
    Something like: Enter New Root Password means your temporary password from file /var/log/mysqld.log

    Thank you.

  6. Dear Ravi Saive,
    Currently I am using centos 6.7 32bit, I have already mysql v 5.5. and aI want to upgrade to mysql 5.7.
    do you have other article to do that?
    is this article only for centos 64bit?

    • Ravi Saive says:

      @Danang,

      I think you can safely upgrade from MySQL 5.5 to MySQL 5.7 using instructions provided in this article, did you tried it?

  7. Alan Labastida says:

    “MySQL v 5.7 or higher generates a temporary random password after installation and stored that in mysql error log file, located at /var/log/mysqld.log
    for an installation by the MySQL Yum repository on CentOS 7.

    use below command to see the password:
    shell > sudo grep ‘temporary password’ /var/log/mysqld.log”
    -sameershah29 https://www.digitalocean.com/community/users/sameershah29

  8. Yannis says:

    Went through with the install after removing MySQL 5.5 and the sevice doesn’t seem to start.
    I get the follwing. Any chance you might know why ?

    ——————————————

    [root@server ~]# yum repolist enabled | grep “mysql.*-community.*”
    mysql-connectors-community/x86_64 MySQL Connectors Community 17
    mysql-tools-community/x86_64 MySQL Tools Community 27
    mysql57-community/x86_64 MySQL 5.7 Community Server 20
    [root@server ~]# service mysqld status
    Redirecting to /bin/systemctl status mysqld.service
    mysqld.service – MySQL Server
    Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
    Active: failed (Result: start-limit) since Thu 2015-11-26 01:40:29 CET; 4min 27s ago
    Process: 2708 ExecStart=/usr/sbin/mysqld –daemonize $MYSQLD_OPTS (code=exited, status=1/FAILURE)
    Process: 2693 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

    Nov 26 01:40:29 server systemd[1]: mysqld.service: control proc…1
    Nov 26 01:40:29 server systemd[1]: Failed to start MySQL Server.
    Nov 26 01:40:29 server systemd[1]: Unit mysqld.service entered ….
    Nov 26 01:40:29 server systemd[1]: mysqld.service holdoff time ….
    Nov 26 01:40:29 server systemd[1]: Stopping MySQL Server…
    Nov 26 01:40:29 server systemd[1]: Starting MySQL Server…
    Nov 26 01:40:29 server systemd[1]: mysqld.service start request….
    Nov 26 01:40:29 server systemd[1]: Failed to start MySQL Server.
    Nov 26 01:40:29 server systemd[1]: Unit mysqld.service entered ….
    Hint: Some lines were ellipsized, use -l to show in full.

    • Ravi Saive says:

      @Yannis,
      It seems you’ve not properly installed MySQL Server Community package, try to install it using following command.

      # yum install mysql-community-server
      

      And then start the MySQL service..

  9. Milind Patil says:

    Mr. Ravi Saive,

    Thank you very much for writing such as precise and simple-to-understand procedure for installing MySQL 5.7.9. This is a great help for me.

    Thanks
    Milind

Got something to say? Join the discussion.

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

Join Over 95000+ Linux Users
  1. 77,543
  2. 4,213
  3. 35,218

Enter your email to get latest Linux Howto's