How to upgrade mariadb 10.0 to 10.2?

August 17, 2017 7.4k views
Ubuntu 16.04 MariaDB


I run wordpress website using Ubuntu 16.04 + Nginx + Mariadb 10.0.x + Php7.

I saw article about upgrade mariadb from 10.0 to 10.1. but i cant find to 10.2

Same as 10.1? or Do I need to upgrade to 10.1 and then upgrade to 10.2 again?

Please let me know how do i that

Thank you.

1 Answer

The suggested upgrade procedure is:

Set innodbfastshutdown 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).
Shutdown MariaDB 10.1,
Take a backup (this is the perfect time to take a backup of your databases)
Uninstall MariaDB 10.1
Install MariaDB 10.2 [2]
Run mysqlupgrade
Ubuntu and Debian packages do this automatically when they are installed; Red Hat, CentOS, and Fedora packages do not
upgrade does two things:
Upgrades the permission tables in the mysql database with some new fields
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)
Add new options to my.cnf to enable features
If you change my.cnf then you need to restart mysqld

Have another answer? Share your knowledge.