This tutorial will teach you how to do MariaDB upgrade in CentOS 7 Ubuntu.We’ll begin by editing the repository file and performing a yum update.
This might fail to automatically update the MariaDB server package, so we are going to show you how you can manually use the mysql_upgrade script to finish the process.
Begin by checking the current version of MariaDB that’s installed.
Now just modify the .repo file that you’ve been using for MariaDB with your favourite text editor and change 10.0 to 1.0.1. In this case, the baseurl line will look like the one below after editing.
Now you need to upgrade MariaDB by executing the ‘yum update’ command. If this doesn’t provide updates to your MariaDB packages, execute ‘yum clean all’ then try again.
On our server, this began updating the MariaDB-client, MariaDB-common, MariaDB-server, and MariaDB-shared packages to the 10.1.21 versions.
All packages were successfully updated except for MariaDB-server, which failed.
A MySQL or MariaDB server package (MariaDB-server-10.0.29-1.el7.centos.x86_64) is installed.
You may choose to use ‘rpm –nodeps -ev ‘ to remove the package which contains the mysqlclient shared library. The library will be reinstalled by the MariaDB-shared package.
This is a brief description of the upgrade process. Further important details can be found in the MariaDB manual, in the Upgrading section.
Basically, we have to finish the procedure manually.
This can be done by running the following commands in this order.
This should stop MariaDB, delete the 10.0 package, install the 10.1 version of the package as per the repository update earlier, initiate MariaDB, and then execute the upgrade script.
You’ll have to enter the password for the user specified when running the upgrade.
The upgrade took around 15 seconds to finish for about 8 databases that were less than 300 MB in total.
Since the contents were checked for compatibility, note that the time for this part could vary depending on your databases.
Now, if we verify the version of MariaDB once more, we will be able to see that we successfully upgraded to version 10.1.
We’ve now shown you how to upgrade MariaDB 10.0 to 10.1. After updating the repository and running ‘yum update’, we need to perform some additional manual steps as shown to complete the upgrade process.