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:
innodb_fast_shutdown
to 0
. It can be changed dynamically with SET GLOBAL
. For example: SET GLOBAL innodb_fast_shutdown=0;
sudo apt-get remove mariadb-server
sudo yum remove MariaDB-server
sudo zypper remove MariaDB-server
my.cnf
. This includes removing any options that are no longer supported. mysql_upgrade
. mysql_upgrade
does two things: mysql
database are fully compatible with the new version. On most servers upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade:
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).
In particular, take note of the changes to innodb_strict_mode, sql_mode, binlog_format, binlog_checksum and innodb_checksum_algorithm.
The following options should be removed or renamed if you use them in your option files:
Option | Reason |
---|---|
aria_recover | Renamed to aria_recover_options to match myisam_recover_options. |
innodb_additional_mem_pool_size | Deprecated in MariaDB 10.0. |
innodb_api_bk_commit_interval | Memcache never implemented in MariaDB. |
innodb_api_disable_rowlock | Memcache never implemented in MariaDB. |
innodb_api_enable_binlog | Memcache never implemented in MariaDB. |
innodb_api_enable_mdl | Memcache never implemented in MariaDB. |
|innodb_api_trx_level | Memcache never implemented in MariaDB. |
innodb_use_sys_malloc | Deprecated in MariaDB 10.0. |
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.
Replication from legacy MySQL servers may require setting binlog_checksum to NONE.
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.
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.
You might consider using the following major new features in MariaDB 10.2:
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/upgrading-from-mariadb-101-to-mariadb-102/