• Upgrading MariaDB from 5.5.41 to 10.0.19 on CentOS 7


    I recently upgraded my MariaDB servers from 5.5.51 to 10.0.19 and the process was very simple and took about 3 minutes from start to finish.  As you can see from the image above, the version was 5.5.41.


    Be sure to make a backup of your system and your databases.  I have done this upgrade on 4 servers and never ran into an issue but it’s always better to be safe.  I use VM’s so I created snapshots and I also made a backup of the databases using Bacula right before I did the upgrade.  You could image your systems and do a sql dump or copy your data directory or do all.  You can’t have too many ways to restore so it’s best to have a few methods versus none or one that won’t work.  Ok, now that that’s out of the way…

    Step 1 – Uninstall the old version.

    The first thing to do is uninstall the current version of MariaDB by typing in the following command:

    yum remove mariadb-server


    Step 2 – Create or Edit the repo file.

    The next thing that is needed is to update the repo file (or create one) so that the system knows where to look for the newest version.  There is a easy to use wizard that will guide you though getting the correct text to update or create the repo file with.  The link is:


    Once you get the correct text, you will need to modify or create the mariaDB.repo file by typing in the following command (use vi instead of nano if you don’t have nano installed):

    nano /etc/yum.repos.d/MariaDB.repo

    This will bring up a either a blank file or one that has older information.  If it’s blank, paste in the text you copied from the wizard or delete all information and paste the new information if there is text present.


    Hit Control + X to exit then hit Y to save the file if you are using nano.  Save the file if you are using Vi.

    Step 3 – Install the newer version of MariaDB.

    Now you are ready to install the newer version by typing in:

    yum install MariaDB-server MariaDB-client


    This will download and install MariaDB version 10.0.19 (of the latest version from the repo).


    Once the installation is complete, you will see Complete!

    Step 4 – Start MariaDB and run the Update Command.

    Once the installation is complete, you need to start MariaDB which you can do by typing in the following command:

    sudo /etc/init.d/mysql start


    You should see that MariaDB was started by a SUCCESS! message and now you need to run the update which is done by using the following command:

    mysql_upgrade –u root –p

    (Enter your password)


    This will go through all your database tables and update them and update permissions etc.

    Once this is complete, you can check your version and you should be running 10.0.19.


Comments are closed.