Skip to main content

How to Upgrade MariaDB 5.5 to MariaDB 10.1 Stable Release on CentOS 7 for VestaCP ?

By Default VestaCP will install old base version of Mariadb 5.5 when installing on Centos 7.

I am using VestaCP with
Version: 0.9.8 (x86_64), Release: 23
5.5.60-MariaDB - MariaDB Server
PHP version: 5.6.40

In this tutorial we are going to show you how to upgrade MariaDB 5.5 to MariaDB 10.1 latest stable version. You will need to have root access to the machine, where you will be performing the upgrade.

Note that if you are running earlier version of MariaDB the recommended course of upgrading is by going through each version. For example MariaDB 5.1 -> 5.5 -> 10.1.
Clean all yum cache & update yum
# yum clean all
# rm -rf /var/cache/yum
# yum update -y
Step 1: Backup or Dump All MariaDB Databases
As always when performing an upgrade creating backup of your existing databases is important. You can either dump the databases with command such:
# mysqldump -u root -pPassbMUs1Pbu --all-databases > /tmp/all-database.sql 
Or alternatively, you can stop the MariaDB service with:
# systemctl stop mariadb 
And copy the databases directory in a separate folder like this:
# cp -a /var/lib/mysql/ /var/lib/mysql.bak 
Step 2: Add the MariaDB Repository
A good practice is to make sure your packages are up to date before making any changes to your repo files. You can do this with:
# yum clean all
# rm -rf /var/cache/yum
# yum update -y
Add MariaDB Repo & Then save and exit the file
# vi /etc/yum.repos.d/MariaDB10.repo 
Add the following text in it: MariaDB Repo Link
# MariaDB 10.1 CentOS repository list - created 2019-04-11 06:04 UTC
name = MariaDB
baseurl =
Step 3: Remove MariaDB 5.5
To do this, simply run the following command:
# yum remove mariadb-server mariadb   [best choice] 
# yum remove mariadb-server mariadb mariadb-libs  
Next, clean the repository cache:
# yum clean all
# rm -rf /var/cache/yum
# yum update -y
Step 4: Installing MariaDB 10.1
# yum -y install MariaDB-server MariaDB-client 
Once the installation is complete, you can start the MariaDB service with:
# systemctl start mariadb 
# systemctl enable mariadb
Finally run the upgrade command to upgrade MariaDB with:
# mysql_upgrade 
To verify that the upgrade was successful, run the following command:
# mysql -V 
This Article is tested on my production environment and successfully working .
And this article based on:
Link 1
Link 2
Link 3


Most Popular

CWP DNS Part 1 : How to Configure DNS properly for CentOS WebPanel on CentOS 7.6

After hosting my parent domain on CWP7.admin, I am getting dns error and i'm not able access my server using my server FQDN but i can access using my server IP.
So what can i do for that problem ?

Yes, you have to fix the error .

Environment Details:
Distro Name: CentOS Linux release 7.6.1810 (Core)
CentOS-Web Panel version: CWP7.admin
CWP version:
WebServer: Apache Only

1.Change Hostname Permanently:
# hostnamectl set-hostname hostnamectl Static hostname: Icon name: computer-vm Chassis: vm Machine ID: 7400071490ea4f7d931374824ad4b52c Boot ID: 6e1f2d76495d4b318c25c4a1195aa130 Virtualization: vmware Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-862.14.4.el7.x86_64 Architecture: x86-64 It also writes this information to the /etc/hostname file as well.
# cat /etc/hostname host.d…

CWP DNS Part 2 : How to Configure DNS properly for CentOS WebPanel on CentOS 7.6

7.Open Main Configuration file
# vi /etc/named.conf 12 options { 13 listen-on port 53 { any; }; 14 listen-on-v6 port 53 { ::1; }; 15 directory "/var/named"; 16 dump-file "/var/named/data/cache_dump.db"; 17 statistics-file "/var/named/data/named_stats.txt"; 18 memstatistics-file "/var/named/data/named_mem_stats.txt"; 19 recursing-file "/var/named/data/named.recursing"; 20 secroots-file "/var/named/data/named.secroots"; 21 allow-query { any; }; 33 recursion no; 34 35 dnssec-enable yes; 36 dnssec-validation yes; 54 zone "." IN { 55 type hint; 56 file ""; 57 }; 58 59 include "/etc/named.rfc1912.zones"; 60 include "/etc/named.root.key"; 61 …