Upgrading MySQL with Directly-Downloaded RPM Packages

MySQLMySQLi Database

MySQL can be upgraded on RPM based platforms using MySQL Yum repository or MySQL SLES repository.

Upgrade with RPM Packages

If MySQL needs to be upgraded using the RPM packages that is downloaded directly from the MySQL Developer Zone, go to folder that contains all the downloaded packages (ensures that no other RPM package has a similar name), and use the following command −

yum install mysql−community−{server,client,common,libs}−*

The yum is replaced with zypper for SLES systems, and with dnf for dnf-enabled systems.

It is much preferable to use high-level package management tool such as yum to install the packages, but users who prefer direct rpm commands can replace the yum install command with the rpm -Uvh command.

Restart Server

The MySQL server is automatically restarted when the installation ends, if it was running when the upgrade installation began.

If the server isn’t running when the upgrade installation begins, the server has to be restarted explicitly by the user after the upgrade installation is completed. It can be done using the below command −

service mysqld start

Execute mysql_upgrade command

Once the server is restarted, ‘mysql_upgrade’ command is executed to check and resolve any incompatibilities between the old data and the upgraded software.

Upgrading to MySQL Enterprise Server

Upgradation from a community version to a commercial version of MySQL requires that the user should first uninstall the community version and then install the commercial version.

Interoperability with operating system native MySQL packages

Many Linux distributions ship MySQL as an integrated part of the operating system itself. When the latest versions of RPMs from Oracle is installed using the standard package management tool (yum, dnf, or zypper), it will easily upgrade and replace the version of MySQL that comes with the operating system,

Upgrading from non-native MySQL packages

If the user has installed MySQL with third-party packages which are not from the user’s Linux distribution's native software repository (let us take an example: the packages directly downloaded from the vendor), the user needs to uninstall all those packages before they can upgrade using the packages from Oracle.

Updated on 08-Mar-2021 12:04:43