
上QQ阅读APP看书,第一时间看更新
In-place upgrades
Here is an outline of the steps:
- Shut down the old MySQL version.
- Replace the old MySQL binaries or packages with the new ones (detailed steps for different types of installation methods are covered).
- Restart MySQL on the existing data directory.
- Run the mysql_upgrade utility.
- In the MySQL 5.7 server, if there are encrypted InnoDB tablespaces, rotate the keyring master key by executing this statement:
mysql> ALTER INSTANCE ROTATE INNODB MASTER KEY;
Here are the detailed steps:
- Configure your MySQL 5.7 server to perform a slow shutdown. With a slow shutdown, InnoDB performs a full purge and change buffer merge before shutting down, which ensures that the undo logs are empty and the data files are fully prepared in case of file format differences between releases.
This step is the most important because, without it, you will end up with the following error:
[ERROR] InnoDB: Upgrade after a crash is not supported.
This redo log was created with MySQL 5.7.18. Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/upgrading.html:
mysql> SET GLOBAL innodb_fast_shutdown = 0;
- Shut down the MySQL server as described in the Starting or Stopping MySQL 8 section.
Upgrade the MySQL binaries or packages.