In today’s article, AZDIGI will show how to upgrade MariaDB on DirectAdmin with CustomBuild 2.0 most simply.
In using DirectAdmin, you will need to upgrade much accompanying software, including MariaDB if you use MariaDB as your system’s database management system. If you are using MySQL database management system, you can refer to the following tutorial to convert from MySQL database management system to MariaDB:
Usually, there are two types of version upgrades. The first form is to upgrade minor patched and optimized versions; these versions will have names like 10.3.1 10.3.1 > 10.3.2 > 10.3.3… In this form, you can completely upgrade through the Custombuild 2.0 interface at the Admin DirectAdmin level. The second type is the major upgrade type, where you’ll jump from version 10.3 to 10.4 or 10.5.
In this article, AZDIGI will show you to upgrade MariaDB on DirectAdmin in this second form.
II. Upgrade the MariaDB version on DirectAdmin
To upgrade MariaDB on DirectAdmin, follow these 3 steps.
Step 1: SSH into your DirectAdmin system
To upgrade MariaDB on DirectAdmin, we first need to SSH or access your VPS/server as root. If you do not know how to SSH into your VPS/Server, you can refer to the following tutorial:
After successfully SSH, we continue with step 2 to check the current version of MariaDB in use.
Step 2: Check the current MariaDB version
To check the current MariaDB version, use the following command:
Below is my result with the currently installed version of 10.3.24.
So we know the MariaDB version is currently in use. we continue with step 3 to upgrade to the latest version.
Step 3: Upgrade MariaDB on DirectAdmin with CustomBuild 2.0
First, we need to check if the version of CustomBuild we are using is 2.0 or not. To check the version of CustomBuild you are using, please check out the following short tutorial:
In case your CustomBuild version is lower than 2.0 then you need to upgrade CustomBuild 1.x to 2.0, you can check out the following tutorial:
After having CustomBuild 2.0, we use the following commands to upgrade MariaDB on DirectAdmin:
cd /usr/local/directadmin/custombuild ./build update ./build set mariadb 10.5 ./build set mysql_inst mariadb ./build set mysql_backup yes ./build mariadb
Explanation of the above commands:
- Command 1: Move to custombuild folder.
- Command 2: Update custombuild script.
- Command 3: Adjust the current MariaDB instance configuration to 10.5.
- Command 4: Use the database management system MariaDB (there are 2 options 1 is MySQL, 2 is MariaDB).
- Command 5: Adjust the configuration to enable database backup before running the installation command.
- Command 6: Start reinstalling MariaDB with the new configuration.
More information: at the moment I write this article, there is only MariaDB 10.5, so when you change it to 10.6, it will not be valid, in the future, it may be after MariaDB releases this version, you can see the new version of MariaDB at the following link:
Below is an image of when I tried to adjust the version to 10.5 before upgrading MariaDB on DirectAdmin to the new version.
The installation time will depend on the strength of your VPS/Server and the connection at that time because, in this process, it is necessary to download some quite heavy installation files. The installation process on my VPS 4 CPU Cores is 5 minutes.
Another small note that affects your installation time is that during the installation process, the system will automatically dump all existing databases into a directory to avoid data loss or errors. Therefore, if your VPS/Server has a lot of databases, the installation time will be longer.
To check where the directory containing the database is dumped, use the following 2 commands:
cd /usr/local/directadmin/custombuild cat options.conf | grep mysql_backup_dir
Here my directory will be
This is your screen after running the
./build mariadb command.
We recheck with the
mysqld -V to see if we have upgraded to the new version.
Thus, my VPS has been installed with the new MariaDB version of 10.5.5. So we have completed all the steps to upgrade MariaDB on DirectAdmin.
So AZDIGI has been shown to complete the steps to upgrade MariaDB on DirectAdmin quickly and the directory containing the databases that were dumped during the installation of the new MySQL version. Hope this article will be of help to you.
Wishing you success!
See more useful articles about DirectAdmin at the following link:
If you need assistance, you can contact support in the ways below: