Home >Database >Mysql Tutorial >Downgrading binary and package-based installations on Unix/Linux

Downgrading binary and package-based installations on Unix/Linux

PHPz
PHPzforward
2023-09-13 12:25:061061browse

在 Unix/Linux 上降级二进制和基于包的安装

Let’s learn how to downgrade binary and package-based installations on Unix or Linux. There are several ways to downgrade binary and package-based installations on Unix or Linux. They are discussed below.

In-place downgrade

  • In-place downgrade involves shutting down the new MySQL version.

  • After this operation is completed, the new MySQL binaries or packages will be replaced with the old binaries or packages.

  • After completing this operation, the old MySQL version is restarted on the existing data directory.

  • MySQL must be configured to perform a slow shutdown by setting innodb_fast_shutdown to 0.

  • The following command will perform the same operation -

    mysql -u root -p --execute="SET GLOBAL innodb_fast_shutdown=0"

    Shut down the newer MySQL server. This can be done using the following command -

    mysqladmin -u root -p shutdown

    After a slow shutdown, the InnoDB redo log files are deleted from the data directory (ib_logfile* files). This is done to avoid downgrade issues related to the redo log file format that occur between versions.

    Logical Downgrade

    • Logical downgrade involves using mysqldump to dump all tables in the new MySQL version.

    • After completing this operation, the dump file will be loaded into the old MySQL version.

    • Downgrade between versions within the same version supports logical downgrade Version series and downgrade to previous version levels.

    • Only downgrades between General Availability (GA) releases are supported.

    • Dump all databases. This is done using the following command -

    mysqldump −u root −p
       −−add−drop−table −−routines −−events
       −−all−databases −−force > data−for−downgrade.sql

    Shut down newer MySQL servers using the following command -

    mysqladmin −u root −p shutdown

The above is the detailed content of Downgrading binary and package-based installations on Unix/Linux. 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