Home >Database >Mysql Tutorial >Upgrading MySQL using the MySQL APT repository

Upgrading MySQL using the MySQL APT repository

WBOY
WBOYforward
2023-08-27 19:17:021140browse

使用 MySQL APT 存储库升级 MySQL

The MySQL APT repository can be used to perform in-place upgrades of MySQL installations.

This can be done using the following steps -

Upgrading MySQL

Make sure that the MySQL APT repository is present in the repository list of the user's system. Make sure the latest package information is present on the MySQL APT repository by running the following command -

shell> sudo apt-get update

By default, the MySQL APT repository updates MySQL to the version selected when the user added the MySQL APT repository to the system series.

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

Use the following command to upgrade MySQL -

shell> sudo apt-get install mysql-server

When you execute the above command, the MySQL server, client and database public files will be upgraded, provided that a new version is available.

Upgrading MySQL packages

To upgrade other MySQL packages, use the same "apt-get install" command and provide the name of the package that needs to be upgraded -

shell> sudo apt-get install package-name

To view The name of the package that has been installed from the MySQL APT repository, you can use the following command -

shell> dpkg −l | grep mysql | grep ii

The MySQL server is restarted after the APT update.

The above is the detailed content of Upgrading MySQL using the MySQL APT repository. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete