❤️ AZDIGI has officially updated to a new blog system. However, some posts may have incorrect or mismatched images. Please click the Report article button at the bottom of the post so AZDIGI can update as quickly as possible. Thank you!
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:
mysqld -V

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:
cp /etc/my.cnf /etc/my.cnf.bak
Next need to uninstall the old MariaDB version from the system with the following commands:
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“.

After the uninstall is complete, we execute the following commands to install the latest version of MariaDB 10.5:
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:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
If your server is running CentOS 8, you can use the following code:
[mariadb]
name = MariaDB
baseurl =http://yum.mariadb.org/10.5/centos8-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Then we save and execute the following commands to start the installation of the latest MariaDB 10.5 version.
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:

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:
rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf
systemctl enable mysql
service mysql start
mysql_upgrade
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:

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.

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:
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com .
You might also like
- Upgrade the MariaDB version on CentOS Web Panel
- How to upgrade MariaDB 10.5 on CyberPanel
- Install OpenLiteSpeed, MariaDB and PHP on Centos 7
- Fix the error: YumRepo Error All mirror URLs are not using ftp http[s] or file
- Upgrade the MariaDB version on DirectAdmin
- How to convert MySQL to MariaDB on DirectAdmin
About the author
Thạch Phạm
Đồng sáng lập và Giám đốc điều hành của AZDIGI. Có hơn 15 năm kinh nghiệm trong phổ biến kiến thức liên quan đến WordPress tại thachpham.com, phát triển website và phát triển hệ thống.