Upgrading MySQL Server
Upgrading MySQL Server
The first step when performing a minor version upgrade is to obtain the current version of MySQL and
the newer minor upgrade available.
To get the current version of MySQL on Red Hat, we use the following command, which queries the
RPM package:
To obtain the newer version, we can check the Percona website and see which is the latest version
released.
https://www.percona.com/downloads
To summarize our current setup, we are running Percona MySQL 8.0.30 and aiming to upgrade it to
version 8.0.35
To begin, we will obtain the new version for Percona Server and Percona Server Client from the
Percona website. We can directly download the packages using the wget command.
i will copy the link for download and past it along side wget command to download the package on VM
wget https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-
Server-8.0.35-27/binary/redhat/8/x86_64/percona-server-client-8.0.35-
27.1.el8.x86_64.rpm?_gl=1*14grt98*_gcl_au*MTA0Mzk1MDYyOS4xNzE1NjkwMzk5
wget https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-
Server-8.0.35-27/binary/redhat/8/x86_64/percona-server-server-8.0.35-
27.1.el8.x86_64.rpm?_gl=1*14grt98*_gcl_au*MTA0Mzk1MDYyOS4xNzE1NjkwMzk5
the file will be download compressed in at format , we will use command tar -xf [filename] to
extract the file
reference link
For a MySQL major version upgrade, the process typically involves installing the desired major version
first, such as MySQL 5.7, and then performing the upgrade to version 8.
PERCONA REPO
sudo yum -y install https://repo.percona.com/yum/percona-release-
latest.noarch.rpm
ENABLE 5.7 REPO
sudo percona-release setup ps57
INSTALL MYSQL 5.7
sudo yum -y install Percona-Server-server-57
VERIFY MYSQL 5.7
rpm -qa | grep -i percona
START MYSQL
sudo systemctl start mysqld.service
GRAB ROOT PASSWORD AND RUN SECURE INSTALLATION
grep temp /var/log/mysqld.log
mysql_secure_installation
For testing purposes, we'll replicate the real-world example database on the server to simulate the
upgrade in a more realistic manner. You can execute the following command to download the database
and then import it into the MySQL server.
wget https://downloads.mysql.com/docs/world-db.tar.gz
cd world-db/
mysql -uroot -p < world.sql
1- MySQL upgrade checklist
first thing we need to confirm that all the data in the database and all tables are in proper format
There is actually a MySQL script, designed by Oracle, that checks whether the current version is
compatible with the MySQL upgrade process.
you can follow the steps in this link You'll download MySQL Shell and run a script that assesses whether
upgrading from the current version to MySQL 8 is feasible.
mysqlsh is installed and now we will run the script provided by oracle to check upgrade combability
The concern is ensuring that the report generated by the script does not contain any errors.
Warnings may be present, but the summary report will confirm that there are no errors preventing the
upgrade, providing a description of the findings.
one waring is regarding authencating since mysql 8 will use new verison
Perform MySQL Major Version Upgrade
wget https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-
Server-8.0.30-22/binary/redhat/8/x86_64/Percona-Server-8.0.30-22-
r7e301439b65-el8-x86_64-bundle.tar?
_gl=1*1hchtzx*_gcl_au*MTA0Mzk1MDYyOS4xNzE1NjkwMzk5
Removing 'shared' and 'shared-compat' will uninstall both the MySQL Server client and the MySQL
Server itself.
now we will install mysql 8 on system
You can monitor the progress of the upgrade process by checking the log files, which will provide
insights into how the upgrade process is proceeding.