Update/Upgrade to MariaDB 10.3 on VestaCP/CWP/CentOS 7

by Sandy

In this tutorial we’ll upgrade/install to Mariadb 10.3 on Centos 7 running Vesta CP, by default vesta cp will install old base version of Mariadb 5.5 when installing on Centos 7. This tutorial will also work without vestacp installed i.e. on CWP, Cpanel. MariaDB is designed as a drop-in replacement of MySQL with more features, new storage engines, fewer bugs, and better performance. MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Foundation and the MariaDB Corporation, and by many people in the community. To upgrade follow this simple steps to upgrade it to latest version.

Update/Upgrade to MariaDB 10.4 on VestaCP/CWP/CentOS 7

This tutorial will also work with CWP, cpanel.

Step 1 Remove MariaDB 5.5/10.0/10.1/10.2

Before installing it is recommended to backup your databases, although it is not necessary if you followed this steps carefully.

First backup your current my.cnf config :

cp /etc/my.cnf /etc/my.cnf.bak

Now we need to remove current version of mariadb 5.5 installed on centos 7 :

For MariaDB 5.5 :

service mariadb stop  /  service mysql stop
yum remove mariadb mariadb-server

At this point MariaDB 5.5 will be removed completely but the databases are not removed don’t need to worry.

For MariaDB 10.0/10.1/10.2 :

service mysql stop 
yum remove MariaDB-server MariaDB-client

At this point MariaDB 10.0/10.1/10.2 will be removed completely but the databases are not removed don’t need to worry.

Then Install MariaDB 10.3 :

Step 2 Installation/Updating from MariaDB 5.5/10.0/10.1/10.2 to MariaDB 10.3

Install/enable Official repo for mariadb 10.3:

yum install nano epel-release -y

Now edit/create the Repo file :

Ensure you don’t have any other MariaDB repo file in /etc/yum.repos.d if exists delete or backup the existing repo file :

mv /etc/yum.repos.d/mariadb.repo /etc/yum.repos.d/mariadb.repo.bak
nano /etc/yum.repos.d/mariadb.repo

then paste this lines and save it :

name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64

After that we’ll install Mariadb 10.3

yum clean all
yum install MariaDB-server MariaDB-client net-snmp perl-DBD-MySQL -y
yum update -y

Restore the my.cnf file :

rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf

Then enable mariadb to start on boot and start the service :

systemctl enable mysql
service mysql start

Step 3

After that we need to upgrade current databases by this command :


that’s it you’ve successfully upgraded MariaDB 5.5/10.0/10.1/10.2 to MariaDB 10.3.

You can confirm the version by running this command from terminal ssh:


If this post helps you in any way please consider a donation

Donate with PayPal :


Donate with Paytm :


You may also like

Leave a Reply

4 Comment threads
4 Thread replies
Most reacted comment
Hottest comment thread
5 Comment authors
SandysantiagoMauricio LópezAmin GholamiJulius Recent comment authors
newest oldest most voted
Notify of

This did not work for me. MySQL/MariaDB is no longer on my system.

Thank God I did this on a test machine!!!


My apologies. This was my own fault. I missed a major step initially but I ran it again and now everything is working just fantastic.

Thank you guys!

Amin Gholami
Amin Gholami

Does this method save data in databases?

Mauricio López

Following the tutorial for upgrading from mariadb5.5 I get the following error after issuing the command `mysql_upgrade`:
`Phase 4/7: Running ‘mysql_fix_privilege_tables’
ERROR 29 (HY000) at line 343: File ‘/var/log/mysql-slow-queries.log’ not found (Errcode: 13 “Permission denied”)
FATAL ERROR: Upgrade failed`

I fixed it by creating the missing file and giving it the corresponding permissions:
`touch /var/log/mysql-slow-queries.log
chown mysql:mysql /var/log/mysql-slow-queries.log`

And running `mysql_upgrade` again, of course 😉

I also had to use
`systemctl enable mariadb
service mariadb start`
instead of:
`systemctl enable mysql
service mysql start`


Hi, this worked like a charm. One simple question…Upgrading to MariaDB 10.4 is as simple as changing the version number from this line? (from 10.3 to 10.4) ??

baseurl = http://yum.mariadb.org/10.3/centos7-amd64