ZeroStopBits

How to Upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS 7.5 (1804)

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!

8 Comments

Ryanski Akira Saotome

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

Dima

exelent worked on my server and production

Paulo Boaventura

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

Yatin

Thanks a lot. it woks for me.

Odiljon

It works!

James

Exactly what I needed. Easy, quick, and no issues.

hozifa

thanx , work for me !

Anvar

Thanks! Short and working tutorial!

Comments are closed. Need a hand with something? Contact us.

Need a server to practise on?

Spin up a KVM VPS and follow along with any of these tutorials without risking your production boxes.