Skip to content

In this tutorial, I’ll show you how to upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS 7.5 (1804).

This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have already installed MariaDB 5.5.

 

1. Make sure you’re running MariaDB 5.5

Run the following command:

mysql -v

Should output the following:

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.60-MariaDB MariaDB Server

Perfect, let’s keep going!

 

2. Add the MariaDB 10.3 Repository

Run the following command to add the MariaDB 10.3 repository to yum:

nano /etc/yum.repos.d/maria10-3.repo

Paste the following into the editor

# MariaDB 10.3 CentOS repository list - created 2018-11-19 23:14 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Save and close the editor, then move to the next step

 

3. Upgrade to MariaDB 10.3 and verify success

Run the following command to upgrade to MariaDB 10.3:

yum -y upgrade maria*

Output should look something like this:

=============================================================================================================================================
 Package                            Arch                       Version                                     Repository                   Size
=============================================================================================================================================
Installing:
 MariaDB-client                     x86_64                     10.3.10-1.el7.centos                        mariadb                      53 M
     replacing  mariadb.x86_64 1:5.5.60-1.el7_5
 MariaDB-compat                     x86_64                     10.3.10-1.el7.centos                        mariadb                     2.8 M
     replacing  mariadb-libs.x86_64 1:5.5.60-1.el7_5
 MariaDB-server                     x86_64                     10.3.10-1.el7.centos                        mariadb                     123 M
     replacing  mariadb-server.x86_64 1:5.5.60-1.el7_5
Installing for dependencies:
 MariaDB-common                     x86_64                     10.3.10-1.el7.centos                        mariadb                     157 k

Transaction Summary
=============================================================================================================================================

Once yum does it’s thing, restart the MariaDB daemon:

systemctl restart mariadb

Then verify that the service has started and the installation is complete:

mysql -v

You should see output similar to the following:

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.10-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Sweet, you’re now running MariaDB 10.3!

Sponsored Links

Comments (8)

  1. After following this steps. Don’t forget to run the command: mysql_upgrade

    If not you would get this error:
    Error Code: 1146
    Table ‘mysql.column_stats’ doesn’t exist

  2. Was having the following error after running -> mysql_upgrade

    ##############
    MISTAKE
    ##############
    Version check failed. Got the following error when calling the ‘mysql’ command line client
    ERROR 1045 (28000): Access denied for user ‘root’ @ ‘localhost’ (using password: NO)
    FATAL ERROR: Upgrade failed
    #############

    SOLUTION:

    mysql_upgrade –password

Don't be shy, leave a reply!