1. Create a backup of the original MySQL data

cp /var/lib/mysql /var/lib/mysql.original

2. Download the MySQL 5.7 RPM

wget http://repo.mysql.com/mysql57-community-release-el7.rpm -P /tmp/

3. Remove the MySQL-Community RPM that contains MySQL 5.6

yum remove mysql-community-release

4. Install the MySQL 5.7 RPM

rpm -ivh /tmp/mysql57-community-release-el7.rpm

5. Update the MySQL Repository to 5.7

yum update mysql

7. Let MySQL know that it received an upgrade

mysql_upgrade

One thought on “Upgrade MySQL 5.6 to MySQL 5.7 – CentOS”

  1. Really helpful post. Thanks for sharing.
    Just wanted to point out here that one step is missing here, after step 5, we again need to move /var/lib/mysql.original to /var/lib/mysql to then mysql_upgrade will run successfully.

Leave a Reply

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