Home WebServer PanelFastPanel Upgrade MariaDB on FASTPANEL

Upgrade MariaDB on FASTPANEL

by Thạch Phạm
Published: Last Updated on

In today’s article, AZDIGI will show you how to upgrade MariaDB on FASTPANEL to the latest version, 10.5.

I. Overview

At the moment, the latest MariaDB version is version 10.5 (December 2020), but when you install FASTPANEL at this time, FASTPANEL only installs the MariaDB MariaDB 10.3 version for us, which is relatively old.

Upgrading to the latest MariaDB version will have many benefits to mention as follows:

  • Improves the overall stability of MariaDB.
  • Fixed a lot of minor bugs in older versions of MariaDB.
  • Improved performance compared to older versions.
  • Increased security.
  • Support for many new features.

And many more benefits. With so many benefits, we have many reasons to upgrade MariaDB on FASTPANEL periodically.

To upgrade MariaDB on FASTPANEL, please see the next part of the article.

II. Upgrade MariaDB on FASTPANEL

To upgrade MariaDB on FASTPANEL, we follow these 2 steps.

Step 1: SSH into your FASTPANEL server

To upgrade MariaDB on FASTPANEL, we first need to SSH into your VPS/server as root. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

After successfully SSH, we continue with step 2 to perform the MariaDB version check command.

Step 2: Check the MariaDB version in use

To check the current version of MariaDB in use, we use the following command:

AZDIGI Tutorial
mysqld -V
The default installed MariaDB version is 10.3.

After knowing the version of MariaDB in use, we continue with step 3 to perform the MariaDB upgrade commands on FASTPANEL.

Step 3: Execute MariaDB upgrade commands on FASTPANEL

To upgrade MariaDB on FASTPANEL, we do the following:

First, you need to backup the my.cnf configuration file with the following command:

AZDIGI Tutorial
cp /etc/my.cnf /etc/my.cnf.bak

Next need to uninstall the old MariaDB version from the system with the following commands:

AZDIGI Tutorial
service mysql stop 
yum remove MariaDB-server MariaDB-client -y

At this point, MariaDB 10.3 will be completely deleted, but the database is not deleted, so you don’t need to worry at all.

Below is the image after running the default MariaDB 10.3 uninstall command with the command: “yum remove mariadb mariadb-server -y“.

MariaDB 10.3 uninstall completely.

After the uninstall is complete, we execute the following commands to install the latest version of MariaDB 10.5:

AZDIGI Tutorial
yum install nano epel-release -y
mv /etc/yum.repos.d/mariadb.repo /etc/yum.repos.d/mariadb.repo.bak
vi /etc/yum.repos.d/mariadb.repo

After executing the command vi /etc/yum.repos.d/mariadb.repo, we paste the following content in, depending on the server operating system you choose correctly.

If your server is running CentOS 7, you can use the following code:

AZDIGI Tutorial
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64

If your server is running CentOS 8, you can use the following code:

AZDIGI Tutorial
name = MariaDB
baseurl =http://yum.mariadb.org/10.5/centos8-amd64

Then we save and execute the following commands to start the installation of the latest MariaDB 10.5 version.

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

The installation process takes place relatively quickly, it takes less than 10 minutes to complete. The time may be longer if the VPS you are using has a bad connection or is overloaded. Here is the image after executing the above commands:

Installation and update completed MariaDB 10.5.

However, at this point, we are not done yet, we need to restore the my.cnf configuration file, re-enable MariaDB and update the existing database again with the following commands:

AZDIGI Tutorial
rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf
systemctl enable mysql
service mysql start

Explanation of the above commands:

  • Command 1: Delete the default configuration file after installing the new MariaDB version.
  • Command 2: Restore the previously backed-up configuration version.
  • Command 3: Enable system startup for MariaDB/MySQL.
  • Command 4: Enable the MariaDB/MySQL service.
  • Command 5: Update the current database.

Please wait a moment for MariaDB to update the old data, as shown below:

MariaDB updates the current database.

So we have completed the MariaDB upgrade on FASTPANEL. Now everything is back to normal. And you can reuse the mysqld -V command to check the MariaDB version.

The latest version of MariaDB 10.5.8 has been installed successfully.

III. Summary

Hopefully, through this article, you know how to upgrade MariaDB on FASTPANEL. Depending on the case that your server is using CentOS 7 or CentOS 8 you use the command correctly.

Hope this article will be of help to you. Wishing you success!

If you find the article useful, don’t forget to rate it 5 stars!

In addition, you can check out some other articles about FASTPANEL at the link below:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign