This brief tutorial is going to show students and new users how to upgrade MariaDB from 10.0 to 10.1 to 10.2 on the Ubuntu server to the latest version. 10.2. with every subsequent release, new features and functions are added to the newer versions. if you need to take advantage of these features, you will need to upgrade. If you do decide on the upgrade, the steps below should be a great place to start.

Prepare MariaDB for Upgrade

Before upgrading MariaDB, the command below may be necessary. the commands below set innodb_fast_shutdown to 0. If you don’t do that, you may run into trouble where the upgrade hangs and may not go as planned. To prepare MariaDB for Upgrade, logon to the database server as root with the root password and run the commands below Then run the commands below to set innodb_fast_shutdown to 0

Backup Your Databases

Now that you’ve prepared MariaDB to upgrade properly, continue below. It’s always important to back up your databases before attempting to upgrade. on Linux systems, the mysqldump command can be used to back up MariaDB databases. To backup, run the commands below against each database you wish to backup. Replace database_name with the actual database you wish to backup. Do that on all your databases.

Uninstall MariaDB 10.0 or 10.1

Now that you’ve taken a backup of your databases, you can now proceed to uninstall the older version of MariaDB. to do that, run the commands below. First, stop the database and uninstall it. On Ubuntu 16.04, run the commands below. On Ubuntu 17.10 and up, run the commands below: Then run the commands below to uninstall MariaDB.

Install MariaDB Newer Versions

After uninstalling the older version, you can install MariaDB’s newer versions by using the repository below. For MariaDB 10.1, add the repository below: For MariaDB 10.2, add the repository below: After adding the package repositories, run the commands below to install the newer version of MariaDB based on the repository you added to your systems. Next, run the commands below to upgrade If everything is right, your server should be upgraded to the newer version. Enjoy! You  may also like the post below: