This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-22. For the latest, interactive version please visit https://mariadb.com/kb/.

Upgrading from MariaDB 10.1 to MariaDB 10.2

How to Upgrade

For Windows, see Upgrading MariaDB on Windows instead.

For MariaDB Galera Cluster, see Upgrading from MariaDB 10.1 to MariaDB 10.2 with Galera Cluster instead.

Before you upgrade, it would be best to take a backup of your database. This is always a good idea to do before an upgrade. We would recommend Mariabackup.

The suggested upgrade procedure is:

  1. Modify the repository configuration, so the system's package manager installs MariaDB 10.2. For example,
  2. Set innodb_fast_shutdown to 0. It can be changed dynamically with SET GLOBAL. For example:
    SET GLOBAL innodb_fast_shutdown=0;
    • This step is not necessary when upgrading to MariaDB 10.2.5 or later. Omitting it can make the upgrade process far faster. See MDEV-12289 for more information.
  3. Stop MariaDB.
  4. Uninstall the old version of MariaDB.
    • On Debian, Ubuntu, and other similar Linux distributions, execute the following:
      sudo apt-get remove mariadb-server
    • On RHEL, CentOS, Fedora, and other similar Linux distributions, execute the following:
      sudo yum remove MariaDB-server
    • On SLES, OpenSUSE, and other similar Linux distributions, execute the following:
      sudo zypper remove MariaDB-server
  5. Install the new version of MariaDB.
  6. Make any desired changes to configuration options in option files, such as my.cnf. This includes removing any options that are no longer supported.
  7. Start MariaDB.
  8. Run mysql_upgrade.
    • mysql_upgrade does two things:
      1. Ensures that the system tables in the mysql database are fully compatible with the new version.
      2. Does a very quick check of all tables and marks them as compatible with the new version of MariaDB .

Incompatible Changes Between 10.1 and 10.2

On most servers upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade:

InnoDB Instead of XtraDB

MariaDB 10.2 uses InnoDB as the default storage engine, rather than XtraDB, used in MariaDB 10.1 and before. See Why does MariaDB 10.2 use InnoDB instead of XtraDB? In most cases this should have minimal effect as the latest InnoDB has incorporated most of the improvements made in earlier versions of XtraDB. Note that certain XtraDB system variables are now ignored (although they still exist so as to permit easy upgrading).

Options That Have Changed Default Values

In particular, take note of the changes to innodb_strict_mode, sql_mode, binlog_format, binlog_checksum and innodb_checksum_algorithm.

Options That Have Been Removed or Renamed

The following options should be removed or renamed if you use them in your option files:

OptionReason
aria_recoverRenamed to aria_recover_options to match myisam_recover_options.
innodb_additional_mem_pool_sizeDeprecated in MariaDB 10.0.
innodb_api_bk_commit_intervalMemcache never implemented in MariaDB.
innodb_api_disable_rowlockMemcache never implemented in MariaDB.
innodb_api_enable_binlogMemcache never implemented in MariaDB.
innodb_api_enable_mdlMemcache never implemented in MariaDB.
|innodb_api_trx_levelMemcache never implemented in MariaDB.
innodb_use_sys_mallocDeprecated in MariaDB 10.0.

Reserved Words

New reserved words: OVER, RECURSIVE and ROWS. These can no longer be used as identifiers without being quoted.

TokuDB

TokuDB has been split into a separate package, mariadb-plugin-tokudb.

Replication

Replication from legacy MySQL servers may require setting binlog_checksum to NONE.

SQL Mode

SQL_MODE has been changed; in particular, NOT NULL fields with no default will no longer fall back to a dummy value for inserts which do not specify a value for that field.

Auto_increment

Auto_increment columns are no longer permitted in CHECK constraints, DEFAULT value expressions and virtual columns. They were permitted in earlier versions, but did not work correctly.

TLS

Starting with MariaDB 10.2, when the user specifies the --ssl option with a client or utility, the client or utility will not verify the server certificate by default. In order to verify the server certificate, the user must specify the --ssl-verify-server-cert option to the client or utility. For more information, see the list of options for the mysql client.

Major New Features To Consider

You might consider using the following major new features in MariaDB 10.2:

See Also

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.