How to Upgrade

The suggested upgrade procedure is:

  1. For Windows, see Upgrading MariaDB on Windows instead.
  2. Set innodb_fast_shutdown to 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).
  3. Shutdown MariaDB 10.1,
  4. Take a backup (this is the perfect time to take a backup of your databases)
  5. Uninstall MariaDB 10.1
  6. Install MariaDB 10.2 [2]
  7. Run mysql_upgrade
    • Ubuntu and Debian packages do this automatically when they are installed; Red Hat, CentOS, and Fedora packages do not
    • mysql_upgrade does two things:
      1. Upgrades the permission tables in the mysql database with some new fields
      2. Does a very quick check of all tables and marks them as compatible with MariaDB 10.2
    • In most cases this should be a fast operation (depending of course on the number of tables)
  8. Add new options to my.cnf to enable features
    • If you change my.cnf then you need to restart mysqld

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 config files:

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 has been split into a separate package, mariadb-plugin-tokudb.


In order to continue using Galera without problems when upgrading to a version from MariaDB 10.2.0 to MariaDB 10.2.11, set the innodb_lock_schedule_algorithm variable to FCFS. From MariaDB 10.2.12, this is handled automatically.

See Upgrading Galera Cluster from MariaDB 10.1 to 10.2 for more details on Galera upgrades.


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 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.

Major New Features To Consider

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

See Also


Comments loading...