Upgrade MySQL 5.6 to 5.7 on Centos 7

Reference:

Upgrade MySQL 5.6 to MySQL 5.7 – CentOS

1. # service mysql stop

2. Important backup your databases before upgrade. 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

6. Let MySQL know that it received an upgrade
# service mysql start
mysql_upgrade

# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.22 MySQL Community Server (GPL)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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