MySQL 8.4.4 Upgrade Guide helps database administrators safely upgrade production databases from MySQL 8.0.40 to MySQL 8.4.4 with minimal downtime. This guide covers pre-upgrade validation, database backup using XtraBackup, package installation, repository configuration, service verification, and post-upgrade checks to ensure a successful and reliable MySQL upgrade.
MySQL 8.4.4 Upgrade Guide Prerequisites
Elimination of old data types or functions in tables.
- Removal of orphan.frm files.
- Elimination of triggers with missing or empty definers or improper creation contexts.
- Emptying and reinstating triggers to resolve issues.
[root@mysql-01 centos]# mysqlcheck -u root -p --all-databases --check-upgrade Enter password: employees.departments Table is already up to date employees.dept_emp Table is already up to date employees.dept_manager Table is already up to date employees.employees Table is already up to date —-
Storage Engines and Native Partitioning
- Ensure no partitioned tables.
- Use a query to discover such tables.
mysql> SELECT TABLE_SCHEMA, TABLE_NAME
-> FROM INFORMATION_SCHEMA.TABLES
-> WHERE ENGINE NOT IN ('innodb', 'ndbcluster')
-> AND CREATE_OPTIONS LIKE '%partitioned%';
Empty set (0.16 sec)
Avoid tables with identical names as MySQL 8.4 data dictionary.
Use query to locate such tables.
mysql> SELECT TABLE_SCHEMA, TABLE_NAME
'table_partitions',
'table_stats',
'tables',
'tablespace_files',
'tablespaces',
'triggers',
'view_routine_usage',
'view_table_usage'
); -> FROM INFORMATION_SCHEMA.TABLES
-> WHERE
-> LOWER(TABLE_SCHEMA) = 'mysql'
-> AND
-> LOWER(TABLE_NAME) IN
-> (
-> 'catalogs',
-> 'character_sets',
-> 'check_constraints',
-> 'collations',
-> 'column_statistics',
-> 'column_type_elements',
-> 'columns',
-> 'dd_properties',
-> 'events',
-> 'foreign_key_column_usage',
-> 'foreign_keys',
-> 'index_column_usage',
-> 'index_partitions',
-> 'index_stats',
-> 'indexes',
-> 'parameter_type_elements',
-> 'parameters',
-> 'resource_groups',
-> 'routines',
-> 'schemata',
-> 'st_spatial_reference_systems',
-> 'table_partition_values',
-> 'table_partitions',
-> 'table_stats',
-> 'tables',
-> 'tablespace_files',
-> 'tablespaces',
-> 'triggers',
-> 'view_routine_usage',
-> 'view_table_usage'
-> );
Empty set (0.16 sec)
Finding Longest Foreign Key Constraint Names
- Avoid tables with foreign key constraints over 64 characters.
- Use query for lengthy constraint names.
mysql> SELECT TABLE_SCHEMA, TABLE_NAME
-> FROM INFORMATION_SCHEMA.TABLES
-> WHERE TABLE_NAME IN
-> (SELECT DISTINCT TABLE_NAME
-> FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
-> WHERE REFERENCED_TABLE_SCHEMA IS NOT NULL);
+-------------------------------+-----------------------+
| TABLE_SCHEMA | TABLE_NAME |
+-------------------------------+-----------------------+
| employees | dept_emp |
| employees | dept_manager |
| mysql_innodb_cluster_metadata | async_cluster_members |
| mysql_innodb_cluster_metadata | async_cluster_views |
| mysql_innodb_cluster_metadata | clusterset_members |
| mysql_innodb_cluster_metadata | clusterset_views |
| mysql_innodb_cluster_metadata | instances |
| employees | employees |
| public | employees |
+-------------------------------+-----------------------+
9 rows in set (0.96 sec)
Updating Lower_Case_Table_Names
- Ensure schema and table names are lowercase before upgrading.
- Check for capital letters in schema and table names.
- If lower_case_table_names=1, the process checks for all lowercase names.
- If table or schema names contain capital characters, the update procedure will fail.
mysql> select TABLE_NAME, if(sha(TABLE_NAME) !=sha(lower(TABLE_NAME)),'Yes','No') as UpperCase from information_schema.tables; +------------------------------------------------------+-----------+ | TABLE_NAME | UpperCase | +------------------------------------------------------+-----------+ | Information | Yes | | friends | No | | students | No | | titles | No | | ADMINISTRABLE_ROLE_AUTHORIZATIONS | Yes | | APPLICABLE_ROLES | Yes | | CHARACTER_SETS | Yes | | CHECK_CONSTRAINTS | Yes | | COLLATIONS | Yes | | COLLATION_CHARACTER_SET_APPLICABILITY | Yes | —----------------------------------------------------------------------- | test_data | No | | users | No | | test_table | No | +------------------------------------------------------+-----------+ 399 rows in set (0.29 sec)
MySQL 8.4.4 Upgrade Guide Step-by-Step
Step 01: MySQL 8.4.4 Upgrade Guide: Backup Before Upgrade
Before beginning the upgrading procedure, create a backup of your MySQL files and folders using mysqldump or xtrabackup. In this situation, we used the xtrabackup utility to perform a backup.
[root@mysql-01 centos]# xtrabackup --backup --compress=lz4 --compress-threads=4 \ > --target-dir=/home/centos/030225 \ > --user=root --password 2025-02-03T11:22:18.965560-05:00 0 [Note] [MY-011825] [Xtrabackup] recognized server arguments: --innodb_buffer_pool_size=2147483648 --server-id=1 --log_bin=mysql-bin 2025-02-03T11:22:18.969764-05:00 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: --backup=1 --compress=lz4 --compress-threads=4 --target-dir=/home/centos/030225 --user=root --password Enter password: xtrabackup version 8.0.35-31 based on MySQL server 8.0.35 Linux (x86_64) (revision id: 55ec21d7) 250203 11:22:30 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root' (using password: YES). 250203 11:22:31 version_check Connected to MySQL server 250203 11:22:31 version_check Executing a version check against the server... xtrabackup version 8.0.35-31 based on MySQL server 8.0.35 Linux (x86_64) (revision id: 55ec21d7)
Step 02: checking the current version of mysql.
We have MySQL 8.0.40 installed and are checking the databases.
[root@mysql-01 030225]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 30 Server version: 8.0.40 MySQL Community Server - GPL Copyright (c) 2000, 2024, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +-------------------------------+ | Database | +-------------------------------+ | Audit_Storage | | Dictionary | | Students | | dummy | | employees | | information_schema | | mysql | | mysql_innodb_cluster_metadata | | mysqlslap | | performance_schema | +-------------------------------+ 16 rows in set (0.79 sec) mysql> \q
MySQL 8.4.4 Upgrade Guide: Remove Existing MySQL Packages
[root@mysql-01 ~]# systemctl stop mysqld.service
[root@mysql-01 ~]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Mon 2025-02-03 13:19:43 EST; 12s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 1846 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 1323 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 1846 (code=exited, status=0/SUCCESS)
Status: "Server shutdown complete"
Feb 03 13:19:43 mysql-01.sys1 systemd[1]: mysqld.service: Succeeded.
Feb 03 13:19:44 mysql-01.sys1 systemd[1]: Stopped MySQL Server.
Removing mysql packages
mysql-community-common-8.0.40-1.el8.x86_64 mysql-community-icu-data-files-8.0.40-1.el8.x86_64 mysql-community-server-8.0.40-1.el8.x86_64 mysql-community-client-8.0.40-1.el8.x86_64 mysql-community-libs-8.0.40-1.el8.x86_64
[root@mysql-01 ~]# sudo yum remove mysql-community-common-8.0.40-1.el8.x86_64 mysql-community-icu-data-files-8.0.40-1.el8.x86_64 mysql-community-server-8.0.40-1.el8.x86_64 mysql-community-client-8.0.40-1.el8.x86_64 mysql-community-libs-8.0.40-1.el8.x86_64 Dependencies resolved. ============================================================================================================================================================================================================== Package Architecture Version Repository Size ============================================================================================================================================================================================================== Removing: mysql-community-client x86_64 8.0.40-1.el8 @mysql80-community 79 M mysql-community-common x86_64 8.0.40-1.el8 @System 10 M mysql-community-icu-data-files x86_64 8.0.40-1.el8 @System 3.8 M mysql-community-libs x86_64 8.0.40-1.el8 @mysql80-community 7.4 M mysql-community-server x86_64 8.0.40-1.el8 @mysql80-community 296 M Removing dependent packages: innotop noarch 1.13.0-1.el8 @epel 499 k mysql-errmsg x86_64 8.0.26-1.module_el8.4.0+915+de215114 @appstream 8.8 M percona-xtrabackup-80 x86_64 8.0.35-31.1.el8 @tools-release-x86_64 219 M sysbench x86_64 1.0.20-6.el8 @percona-release-x86_64 1.5 M Removing unused dependencies: libev x86_64 4.24-6.el8 @appstream 99 k mariadb-connector-c x86_64 3.1.11-2.el8_3 @appstream 509 k rsync x86_64 3.1.3-19.el8.1 @baseos 825 k Transaction Summary ============================================================================================================================================================================================================== Remove 17 Packages Freed space: 631 M Is this ok [y/N]: y Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: innotop-1.13.0-1.el8.noarch 1/1 Erasing : innotop-1.13.0-1.el8.noarch 1/17 Erasing : mysql-errmsg-8.0.26-1.module_el8.4.0+915+de215114.x86_64 2/17 Erasing : percona-xtrabackup-80-8.0.35-31.1.el8.x86_64 3/17 Erasing : perl-DBD-MySQL-4.046-3.module_el8+353+7103df35.x86_64 —---------------------- Removed: innotop-1.13.0-1.el8.noarch libev-4.24-6.el8.x86_64 mariadb-connector-c-3.1.11-2.el8_3.x86_64 mysql-common-8.0.26-1.module_el8.4.0+915+de215114.x86_64 mysql-community-client-8.0.40-1.el8.x86_64 mysql-community-common-8.0.40-1.el8.x86_64 mysql-community-icu-data-files-8.0.40-1.el8.x86_64 mysql-community-libs-8.0.40-1.el8.x86_64 mysql-community-server-8.0.40-1.el8.x86_64 mysql-errmsg-8.0.26-1.module_el8.4.0+915+de215114.x86_64 percona-xtrabackup-80-8.0.35-31.1.el8.x86_64 perl-DBD-MySQL-4.046-3.module_el8+353+7103df35.x86_64 perl-DBI-1.641-4.module_el8+332+132e4365.x86_64 perl-Math-BigInt-1:1.9998.11-7.el8.noarch perl-Math-Complex-1.59-422.el8.noarch rsync-3.1.3-19.el8.1.x86_64 sysbench-1.0.20-6.el8.x86_64 Complete!
MySQL 8.4.4 Upgrade Guide: Download and Install Packages
[root@mysql-01 ~]# wget https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar --2025-02-03 13:55:51-- https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar Resolving dev.mysql.com (dev.mysql.com)... 104.108.236.131, 2600:1417:75:495::2e31, 2600:1417:75:49d::2e31 Connecting to dev.mysql.com (dev.mysql.com)|104.108.236.131|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://cdn.mysql.com//Downloads/MySQL-8.4/mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar [following] --2025-02-03 13:55:55-- https://cdn.mysql.com//Downloads/MySQL-8.4/mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar Resolving cdn.mysql.com (cdn.mysql.com)... 23.203.203.187, 2600:1417:75:499::1d68, 2600:1417:75:489::1d68 Connecting to cdn.mysql.com (cdn.mysql.com)|23.203.203.187|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1046353920 (998M) [application/x-tar] Saving to: 'mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar' mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar 100%[=================================================================================================================>] 997.88M 1.93MB/s in 10m 12s 2025-02-03 14:06:10 (1.63 MB/s) - 'mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar' saved [1046353920/1046353920]
Unzipping tar files using below commands.
[root@mysql-01 ~]# tar -xvf mysql-8.4.4-1.el8.x86_64.rpm-bundle.tar mysql-community-client-8.4.4-1.el8.x86_64.rpm mysql-community-client-debuginfo-8.4.4-1.el8.x86_64.rpm mysql-community-client-plugins-8.4.4-1.el8.x86_64.rpm —------------------ mysql-community-test-debuginfo-8.4.4-1.el8.x86_64.rpm
Step 05: Install a new RPM package on a Linux system, specifically a package for the MySQL 8.4 community release.
[root@mysql-01 ~]# sudo rpm -ivh mysql84-community-release-el8-1.noarch.rpm
warning: mysql84-community-release-el8-1.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID a8d3785c: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
package mysql84-community-release-el8-1.noarch is already installed
To display a list of enabled repositories that contain “mysql” in their names.
[root@mysql-01 ~]# yum repolist enabled | grep mysql mysql-connectors-community MySQL Connectors Community mysql-tools-8.4-lts-community MySQL Tools 8.4 LTS Community mysql80-community MySQL 8.0 Community Server
Step 05: Install 8.4.4 latest packages using Yum repository.
[root@mysql-01 ~]# sudo yum install mysql-community-client-8.4.4-1.el8.x86_64.rpm \ > mysql-community-client-debuginfo-8.4.4-1.el8.x86_64.rpm \ > mysql-community-client-plugins-8.4.4-1.el8.x86_64.rpm \ > mysql-community-client-plugins-debuginfo-8.4.4-1.el8.x86_64.rpm \ > mysql-community-common-8.4.4-1.el8.x86_64.rpm \ > mysql-community-debuginfo-8.4.4-1.el8.x86_64.rpm \ > mysql-community-debugsource-8.4.4-1.el8.x86_64.rpm \ > mysql-community-devel-8.4.4-1.el8.x86_64.rpm \ > mysql-community-icu-data-files-8.4.4-1.el8.x86_64.rpm \ > mysql-community-libs-8.4.4-1.el8.x86_64.rpm \ > mysql-community-libs-compat-8.4.4-1.el8.x86_64.rpm \ > mysql-community-libs-compat-debuginfo-8.4.4-1.el8.x86_64.rpm \ > mysql-community-libs-debuginfo-8.4.4-1.el8.x86_64.rpm \ > mysql-community-server-8.4.4-1.el8.x86_64.rpm \ > mysql-community-server-debug-8.4.4-1.el8.x86_64.rpm \ > mysql-community-server-debug-debuginfo-8.4.4-1.el8.x86_64.rpm \ > mysql-community-server-debuginfo-8.4.4-1.el8.x86_64.rpm \ > mysql-community-test-8.4.4-1.el8.x86_64.rpm \ > mysql-community-test-debuginfo-8.4.4-1.el8.x86_64.rpm akopytov_sysbench 398 B/s | 1.0 kB 00:02 akopytov_sysbench-source 463 B/s | 1.0 kB 00:02 Package mysql-community-common-8.4.4-1.el8.x86_64 is already installed. Package mysql-community-icu-data-files-8.4.4-1.el8.x86_64 is already installed. Dependencies resolved. ============================================================================================================================================================================================================== Package Architecture Version Repository Size ============================================================================================================================================================================================================== Installing: mysql-community-client x86_64 8.4.4-1.el8 @commandline 15 M mysql-community-client-debuginfo x86_64 8.4.4-1.el8 @commandline 28 M mysql-community-client-plugins x86_64 8.4.4-1.el8 @commandline 4.6 M mysql-community-client-plugins-debuginfo x86_64 8.4.4-1.el8 @commandline 4.6 M mysql-community-debuginfo x86_64 8.4.4-1.el8 @commandline 4.4 M ------ perl-JSON noarch 2.97.001-2.el8 appstream 96 k perl-Memoize noarch 1.03-422.el8 appstream 119 k Transaction Summary ============================================================================================================================================================================================================== Install 19 Packages Total size: 995 M Total download size: 214 k Installed size: 3.9 G Is this ok [y/N]: y Downloading Packages: (1/2): perl-JSON-2.97.001-2.el8.noarch.rpm 274 kB/s | 96 kB 00:00 (2/2): perl-Memoize-1.03-422.el8.noarch.rpm 71 kB/s | 119 kB 00:01 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 123 kB/s | 214 kB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : Installing : mysql-community-client-plugins-8.4.4-1.el8.x86_64 1/16 Installing : mysql-community-libs-8.4.4-1.el8.x86_64 2/16 Running scriptlet: mysql-community-libs-8.4.4-1.el8.x86_64 3/16 ------- Installed: mysql-community-client-8.4.4-1.el8.x86_64 mysql-community-client-plugins-8.4.4-1.el8.x86_64 mysql-community-devel-8.4.4-1.el8.x86_64 mysql-community-libs-8.4.4-1.el8.x86_64 mysql-community-libs-compat-8.4.4-1.el8.x86_64 mysql-community-libs-compat-debuginfo-8.4.4-1.el8.x86_64 mysql-community-server-8.4.4-1.el8.x86_64 mysql-community-server-debug-8.4.4-1.el8.x86_64 mysql-community-server-debug-debuginfo-8.4.4-1.el8.x86_64 mysql-community-server-debuginfo-8.4.4-1.el8.x86_64 perl-JSON-2.97.001-2.el8.noarch perl-Memoize-1.03-422.el8.noarch Complete!
Step 06: Starting and enabling mysql services:
[root@mysql-01 ~]# systemctl start mysqld.service
[root@mysql-01 ~]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2025-02-03 14:39:34 EST; 17s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 133083 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 133257 (mysqld)
Status: "Server is operational"
Tasks: 51 (limit: 10936)
Memory: 761.1M
CGroup: /system.slice/mysqld.service
└─133257 /usr/sbin/mysqld
Feb 03 14:37:59 mysql-01.sys1 systemd[1]: Starting MySQL Server...
Feb 03 14:39:34 mysql-01.sys1 systemd[1]: Started MySQL Server.
Step 07: Verifying installed mysql version:
[root@mysql-01 ~]# mysql --version mysql Ver 8.4.4 for Linux on x86_64 (MySQL Community Server - GPL)
MySQL 8.4.4 Upgrade Guide: Verify the Upgrade
Verify the MySQL upgradation by connecting to the new database version
[root@mysql-01 etc]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 21 Server version: 8.4.4 MySQL Community Server - GPL Copyright (c) 2000, 2025, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +-------------------------------+ | Database | +-------------------------------+ | Audit_Storage | | Dictionary | | Students | | dummy | | employees | | information_schema | | mysql | | mysql_innodb_cluster_metadata | | mysqlslap | | performance_schema | +-------------------------------+ 16 rows in set (0.49 sec) mysql> \q








1 Comment