Upgrading MySQL Binary or Package-based Installations on Unix/Linux For some Linux platforms, MySQL installation from RPM or Debian packages includes systemd support for managing MySQL server startup and shutdown. On these platforms,  mysqld_safe  is not installed. In such cases, use systemd for server startup and shutdown instead of the methods used in the following instructions. See Section 2.5.9, “Managing MySQL Server with systemd” . For upgrades to MySQL Cluster installations, see also MySQL Cluster Upgrade. To perform an in-place upgrade: ALTER INSTANCE ROTATE INNODB MASTER KEY; SET GLOBAL innodb_fast_shutdown = 1; -- fast shutdown SET GLOBAL innodb_fast_shutdown = 0; -- slow shutdown With a fast or slow shutdown,  InnoDB  leaves its undo logs and data files in a state that can be dealt with in case of file format differences between releases. mysqladmin -u root -p shutdown mysqld_safe --user=mysql --datadir= /path/to/existing-datadir  & If there are encrypted  InnoDB  tablespaces, use the  --early-plugin-load  option to load the keyring plugin. When you start the MySQL 8.0 server, it automatically detects whether data dictionary tables are present. If not, the server creates them in the data directory, populates them with metadata, and then proceeds with its normal startup sequence. During this process, the server upgrades metadata for all database objects, including databases, tablespaces, system and user tables, views, and stored programs (stored procedures and functions, triggers, and Event Scheduler events). The server also removes files that previously were used for metadata storage. For example, after upgrading from MySQL 5.7 to MySQL 8.0, you may notice that tables no longer have  .frm  files. 287 8. Start the MySQL 8.0 server, using the existing data directory. For example: 7. Upgrade the MySQL binaries or packages. If upgrading a binary installation, unpack the new MySQL binary distribution package. See Obtain and Unpack the Distribution. For package-based installations, install the new packages. 6. Shut down the old MySQL server. For example: 5. If you normally run your MySQL server configured with  innodb_fast_shutdown  set to  2  (cold shutdown), configure it to perform a fast or slow shutdown by executing either of these statements: 4. If you are upgrading from MySQL 5.7.11 or earlier to MySQL 8.0, and there are encrypted  InnoDB tablespaces, rotate the keyring master key by executing this statement: 3. If you use XA transactions with  InnoDB , run  XA RECOVER  before upgrading to check for uncommitted XA transactions. If results are returned, either commit or rollback the XA transactions by issuing an  XA COMMIT  or  XA ROLLBACK  statement. 2. Ensure the upgrade readiness of your installation by completing the preliminary checks in Section 2.11.5, “Preparing Your Installation for Upgrade” . 1. Review the information in Section 2.11.1, “Before You Begin” .