Today we will upgrade mysql 5.5 to 5.7 in Linux CentOS 7. As we know till date the mysql has launched version 8 successfully.
So, Let’s have a look on Upgrade mysql version in CentOS step by step
STEP 1: Stop the MySQL server
#sudo service mysqld stop
Step 2: Download the Package of the MySQL 5.7 to upgrade
So, this is the tar file that we have to extract by the tar command, let’s have a look into it.
#sudo tar -xvf mysql-5.7.27-1.el7.x86_64.rpm-bundle.tar
Step 3: So, now we will upgrade the extracted package.
#sudo rpm -Uvh *.rpm
It will download all the packages which have a .rpm extension. As you can see in the above screenshot there 10 rpm packages.
#sudo yum-config-manager --enable mysql57-community
This will enable the repo of MySQL version 5.7 and at the same side disable the repo of the MySQL version 5.5
sudo yum-config-manager --disable mysql55-community
Finally, we will run the update command to Update the MySQL 5.5 to MySQL 5.7 in Linux.
#sudo yum update mysql
Because of this command, the commands of mysql will be upgraded.
Step 4: Start the MySQL server
#sudo service mysqld start
Step 5: More important part is to upgrade the existing database also
#sudo mysql_upgrade -uroot -p
So, the command mysql_upgrade was come with by default, when you will install MySQL.
Step 6: Login and check the version of the MySQL.
[[email protected] etc]# sudo mysql -uroot -proot mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with; or \g. Your MySQL connection id is 7 Server version: 5.7.27 MySQL Community Server (GPL) Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. mysql>
Also, with mysql -V you can check the update version of the MySQL
You can face the error of dependencies failed “error: Failed dependencies: perl(JSON) is needed by mysql-community-test-5.7.27-1.el7.x86_64”
Then you have to install perl-JSON.noarch package by using below command
#sudo yum install perl-JSON.noarch
Thanks guys to read this post! and keep supporting us.
upgrade mysql server from 5.5 to 5.7 linux centos 7, upgrade mysql server from 5.5 to 5.7 linux, mysql update from 5.5 to 5.7, upgrade mysql 5.5 to 5.7 centos 6