Complete steps to upgrade MySQL 5.6 to MySQL 5.7
Description of current setup:
We are currently using MySQL 5.6.34 on Linux Centos 7.
The upgrade version we have chosen is MySQL 5.7.21
Step 1:
Take dump of mysql schema and other important ones. (in case u need to downgrade to current version)
Step 2:
Stop MySQL service:
service mysql stop;
Step 3:
Remove your current MySQL rpms:
First select all installed MySQL rpms
yum list installed|grep -i "mysql"
Then you can remove all rpms having string 5.6 in their names
rpm -ev rpm-name
(we are using rpm -ev instead of yum remove as yum remove removes dependencies also)
Step 4:
Install new rpms
Link to official MySQL download site.
From here you can download the required rpm bundle according to your platform (32,64 bit).
Extract the rpms from tar file:
tar -xvf downloaded-rpm-bundle.tar
Install each rpm in order as they are dependent on one another:
(mysql-common -> mysql-libs -> mysql-client -> mysql-server)
Try installing in this order and follow the error messages for correct ordering.
To install rpm use:
rpm -ivh file.rpm
Step 5
Start MySQL service:
service mysql start
Step 6
Use the same password as in older version
mysql_upgrade -u<user> -p<password>
Step 7
All Done ! Try logging using same credentials