Upgrading MySQL with the MySQL APT Repository

MySQLMySQLi Database

The MySQL APT repository can be used to perform an in-place upgrade for the MySQL installation.

It can be done using the below steps −

Upgrade MySQL

Ensure that MySQL APT repository is already present on user’s system's repository list.Ensure that the most up−to−date package information on the MySQL APT repository is present by running the below command −

shell> sudo apt-get update

By default, the MySQL APT repository updates MySQL to the release series that has been selected by the user when they add the MySQL APT repository to their system.

In general rule, it is suggested to upgrade from one release series to another, rather than skipping a series.

Upgrade MySQL using the below command −

shell> sudo apt-get install mysql-server

The MySQL server, client, and the database common files are upgraded when the above command is executed, provided newer versions are available.

Upgrade MySQL Package

To upgrade other MySQL package, use the same ‘apt-get install’ command and provide the name for the package that needs an upgrade −

shell> sudo apt-get install package-name

To view the names of the packages that have been installed from the MySQL APT repository, the below command can be used −

shell> dpkg −l | grep mysql | grep ii

The MySQL server restarts after an update by APT.

raja
Published on 08-Mar-2021 16:39:53
Advertisements