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
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1 
Step 3: Remove MariaDB 5.5
To do this, simply run the following command:
# yum remove mariadb-server mariadb   [best choice] 
OR
# 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

Comments

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: 0.9.8.757
WebServer: Apache Only
FQDN: host.datahead.biz
IP: 192.120.10.3

1.Change Hostname Permanently:
# hostnamectl set-hostname host.datahead.biz# hostnamectl Static hostname: host.datahead.biz 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: How to Configure Let's Encrypt SSL Certificate for your server Hostname/FQDN on CWP7.admin

I wrote a blog on http://forum.centos-webpanel.com regarding Let's Encrypt SSL Certificate for CentOS Web Panel when "Letsencrypt Manager"  option was exist under Apache Settings >> Letsencrypt Manager >> Install Letsencrypt .

At Present CWP Team has been removed "Letsencrypt Manager"  that's why it will not renew any cert automatic . They made Auto SSL by default but Auto SSL grade is B and I'm not satisfied with Auto SSL.

Previous Article Link Install Letsencrypt SSL Certificate for your Server Hostname/FQDN, 100% Working 

N.B: I am using the below cipherlist 
https://cipherli.st/
https://mozilla.github.io/server-side-tls/ssl-config-generator/
https://wiki.mozilla.org/Security/Server_Side_TLS

So now I am writing this solution again for all of guys and I hope that it will be 100% working again on your CentOS-Webpanel as mine .

Environment Details:
CPU Model: Intel(R) Xeon(R) CPU X3440 @ 2.53GHz
CPU Details: 2 Core (2527 MHz)
Distro Name: Ce…