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:
- Modify the repository configuration, so the system's package manager installs MariaDB 10.2. For example,
- On Debian, Ubuntu, and other similar Linux distributions, see Updating the MariaDB APT repository to a New Major Release for more information.
- On RHEL, CentOS, Fedora, and other similar Linux distributions, see Updating the MariaDB YUM repository to a New Major Release for more information.
- On SLES, OpenSUSE, and other similar Linux distributions, see Updating the MariaDB ZYpp repository to a New Major Release for more information.
- Set
innodb_fast_shutdown
to0
. It can be changed dynamically withSET 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.
- Stop MariaDB.
- 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
- On Debian, Ubuntu, and other similar Linux distributions, execute the following:
- Install the new version of MariaDB.
- On Debian, Ubuntu, and other similar Linux distributions, see Installing MariaDB Packages with APT for more information.
- On RHEL, CentOS, Fedora, and other similar Linux distributions, see Installing MariaDB Packages with YUM for more information.
- On SLES, OpenSUSE, and other similar Linux distributions, see Installing MariaDB Packages with ZYpp for more information.
- Make any desired changes to configuration options in option files, such as
my.cnf
. This includes removing any options that are no longer supported. - Start MariaDB.
- Run
mysql_upgrade
.-
mysql_upgrade
does two things:- Ensures that the system tables in the
mysql
database are fully compatible with the new version. - Does a very quick check of all tables and marks them as compatible with the new version of MariaDB .
- Ensures that the system tables in the
-
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:
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. |
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:
- Window Functions
- mysqlbinlog now supports continuous binary log backups
- Recursive Common Table Expressions
- JSON functions
- See also System Variables Added in MariaDB 10.2.
See Also
© 2021 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/