Upgrading MySQL with the MySQL Yum Repository

MySQLMySQLi Database

Let us understand how to upgrade MySQL with the help of MySQL Yum repository −

MySQL can be upgraded using MySQL Yum repository. Let us see the steps required for this upgradation. By default, the MySQL Yum repository updates MySQL to the latest version in the release series that the user would have chosen during installation

To update to a different release series, the subrepository for the series that has been selected needs to be disabled. The next step is to enable the subrepository for the target series. It is suggested to upgrade from one series to the next, instead of skipping a series.

Upgrade MySQL with yun

MySQL and its components can be updated using the below command. Ensure that these platofrms are not dnf-enabled −

sudo yum update mysql-server

For platforms that are dnf-enabled, use the below command −

sudo dnf upgrade mysql-server

Instead of this, MySQL can be updated by telling Yum to update everything on the user’s system, but this would considerably take more time. To do this on platforms that are not dnf-enabled, use the below command −

sudo yum update

For platforms that are dnf-enabled, use the below command −

sudo dnf upgrade

The MySQL server has to be restarted after an update using Yum. Once the server has restarted, ‘mysql_upgrade’ command needs to be run to check and resolve any incompatibilities between the old data and the upgraded software.

Upgrade a specific component

A specific component can also be upgraded. For this, first list all the packages for the MySQL components, using the below command. This is for dnf-enabled systems −

sudo dnf list installed | grep "^mysql"

For systems that don’t have dnf−enabled, use the below command −

sudo yum list installed | grep "^mysql"

After the package name has been identified, update the package with the below command, for latforms that are not dnf-enabled −

sudo yum update package-name

For dnf-enabled platforms −

sudo dnf upgrade package-name
raja
Updated on 08-Mar-2021 12:10:25

Advertisements