There are no changes in table or index formats on MariaDB 5.5, MariaDB 10.0 & MariaDB 10.1. So, most of the servers the upgrade should be painless from MariaDB 5.5 to MariaDB 10.0 & MariaDB 10.1 also MariaDB 10.0 to MariaDB 10.1.
Even though there is no problem for upgrade for safety purpose we have to take backup before proceeding MariaDB upgrade, this will help you to restore the database in case something goes wrong.
Also read about MariaDB 10.2 installation on Ubuntu, Debian & Mint Systems & MariaDB 10.2 installation on CentOS, RHEL & Fedora Systems.
Backup Database Using Mysqldump Command
Just fire the below commands to take a backup of entire MariaDB on CentOS, RHEL, Fedora, Debian, Mint & Ubuntu Systems using mysqldump command.
[For Database Backup] # mysqldump -u root -p --all-databases > db-backup.sql
Shutdown and Uninstall MariaDB 5.5
Use the below commands to Shutdown and uninstall MariaDB 5.5 on CentOS, RHEL, Fedora, Debian, Mint & Ubuntu Systems.
[For Sysvinit systems] # service mysql stop [For Systemd systems] # systemctl stop mariadb.service [Uninstall MariaDB on Debian based Systems] $ apt-get purge mysql* mariadb* $ apt-get autoremove $ apt-get autoclean [Uninstall MariaDB on RPM based Systems] $ yum remove mysql* mariadb* $ yum clean
Add MariaDB 10.2 Repo & Install
We have already covered in our previous article, how to install MariaDB 10.2 On CentOS, Fedora & RHEL and MariaDB 10.2 On Ubuntu, Debian & Mint Systems. Just follow the steps to add MariaDB 10.2 Stable Repo and install it.
Start and Upgrade MariaDB 10.2
After performing the MariaDB 10.1 installation, you have to start the MariaDB service. By default Debian based system perform upgrade (While doing upgrade, it will upgrade the tables permission & Check table compatibility with MariaDB 10.1) but RPM based system won’t do and we need to run upgrade manually.
[For Sysvinit systems] # service mysql start [For Systemd systems] # systemctl start mariadb.service [Run MariaDB Upgrade on CentOS, RHEL & Fedora] # mysql_upgrade
Verify MariaDB Upgrade
Just login to MariaDB server and check the upgraded version also check the databases.
# mysql -u root -p Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 10.1.11-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>