Upgrade MariaDB Enterprise Server from 10.6 to 11.4
The upgrade guide details the standard upgrade path from MariaDB Enterprise Server 10.6 to MariaDB Enterprise Server 11.4. The upgrade process involves significant changes, particularly to the query optimizer, which was rewritten in version 11.0. While performance is generally improved, query execution plans may change.
This guide provides two strategies:
Standard In-Place Upgrade: The direct procedure for upgrading an existing node.
Staged Rollout (Recommended for Mission-Critical Systems): A low-risk approach using replication and validation.
Prerequisite: Review What's New in MariaDB Enterprise Server 11.4.
Part 1: Standard In-Place Upgrade Process
This section details the standard procedure for performing an in-place upgrade. This involves replacing the server binaries while keeping the data directory intact.
Backup Database
Before performing any upgrade, it is critical to perform a full backup of your database. MariaDB Backup (mariadb-backup) is recommended for this purpose.
Modify Repository Configuration
Update your system's package manager repository to point to MariaDB Enterprise Server 11.4. You will need to regenerate your repository configuration command using the MariaDB Customer Download Token.
Stop MariaDB Service
Stop the running mariadbd process to release locks on the data files.
Ensure innodb_fast_shutdown is set to 1 and check for open XA transactions before stopping.
Uninstall Old Version
Remove the existing MariaDB 10.6 packages. This removes the binaries but preserves the configuration and data directory.
Install New Version
Install the new MariaDB 11.4 packages.
Update Configuration (Critical)
Before starting the server, you must update your option files (e.g., my.cnf) to remove unsupported parameters.
Remove
innodb_defragment: This variable and its associated options (e.g.,innodb_defragment_fill_factor) have been removed.Remove
optimizer_adjust_secondary_key_costs: This variable has no effect in 11.4 and must be removed.Check
innodb_flush_method: This variable is deprecated in 11.4.
Start MariaDB Service
Start the new mariadbd process.
Run mariadb-upgrade (Critical)
Execute mariadb-upgrade to check and update system tables to be compatible with the new version.
Part 2: Alternative Strategy: Staged Rollout for Mission-Critical Systems
For environments sensitive to performance changes or requiring zero downtime, the following staged rollout strategy is recommended.
Introduce Replica
Provision a new server with MariaDB Enterprise Server 11.4 and configure it as a Replica of your existing 10.6 Primary server.
Perform Backup on Primary (10.6): Use
mariadb-backupto create a consistent, non-blocking physical backup.
Prepare the Backup: Prepare the backup to ensure consistency (this can be done on the Primary or the Replica).
Restore on Replica (11.4): Transfer the backup to the new 11.4 server, stop the service, and restore.
Start and Configure Replication: Start the 11.4 server and configure it to replicate from the 10.6 Primary.
Log in to the 11.4 Replica and enable replication. (Note: Ensure server_id is unique in my.cnf).
Validate and Compare (Recommended)
To proactively catch performance regressions caused by the optimizer rewrite, use MaxScale with the Diff Router(Enterprise feature).
Configure MaxScale Ensure your MaxScale
maxscale.cnfdefines both the existing service (routing to 10.6) and the new 11.4 server definition.Create the Diff Service Use
maxctrlto create a "Diff" service that compares the output of your existing production server against the new 11.4 replica.
3. Analyze Results MaxScale will generate JSON reports in its log directory (e.g., /var/lib/maxscale/diff/). Analyze these files to identify queries that return different results or have significantly higher latency on the 11.4 server.
Shift Read Traffic
Gradually migrate read-only traffic to the 11.4 replica.
Update MaxScale Routing If using MaxScale, you can adjust the server weights or maintenance modes to direct read traffic.
Alternatively, update your application connection strings to point to the 11.4 Replica's IP for reporting modules.
Promote to Primary
Once the 11.4 replica has been validated under load, promote it to be the Primary node.
Stop Replication on 11.4 Replica
Enable Writes on 11.4 New Primary
Direct Traffic Update MaxScale or your application configuration to point to the new 11.4 Primary.
Shift Application Traffic
Direct your application traffic to the new 11.4 Primary. Ensure you perform a mariadb-upgrade on the new Primary if it hasn't been run yet (though mariadb-backup restore usually preserves the old system tables, running upgrade is a safety step to ensure system tables are fully compatible with 11.4).
Part 3: Critical Upgrade Information
Optimizer Changes and Application Testing
The Query Optimizer was rewritten in version 11.0. While performance is generally better, query plans can change. It is vital to perform validation (as described in the Staged Rollout section) to catch regressions before production deployment. You should also run ANALYZE TABLE on major tables after upgrading to update statistics.
Required Configuration Changes
The following variables must be addressed in your configuration files (my.cnf) to prevent startup failures or warnings:
optimizer_adjust_secondary_key_costs: MUST REMOVE. This variable has no effect in 11.4 as features are integrated into the new cost model.innodb_defragment: MUST REMOVE. This variable has been removed.des_encrypt/des_decrypt: Functions have been removed.
Backward Replication Compatibility
You can replicate from a MariaDB 11.4 Primary to a MariaDB 10.6 Replica (Backward Replication) under specific conditions:
No new features specific to 11.4 (e.g., new JSON functions,
UUIDdata type) are used in DML or DDL.The variable
binlog_alter_two_phasemust be set to0(default) on the 11.4 Primary.
System-Versioned Tables Conversion
If using System-Versioned Tables, the row_end column format must be updated to support the extended TIMESTAMP range (up to year 2106).
Use the new --update-history option with mariadb-dump to convert row_end values during export.
Use ALTER TABLE to convert the tables after upgrade.
Last updated
Was this helpful?

