MariaDB 10.4 portable in your USB
In previous entries we have discussed how to have MySQL 8 portable, in addition to the option of using XAMP to also have MariaDB also portable (in previous versions it was MySQL the version included in XAMPP).
Download MariaDB portable
You must go to https://downloads.mariadb.org/ and select the last version for downloading (or the one you need). In my case, the last version of June 2020 is 10.4.13.
You need to access to View All MariaDB Releases, because the version I need to download it is not the direct link.
Click on the option for 10.4.13:
In my case, I downloaded the 64 bits versions, although you have also available the 32 bits version. Unzip the file (in my case d:mariadb). You have everything almost ready …. almost!
The first start … and abort
If you try to execute the server after unzipping the MariaDB server, you can notice that the server won’t start:
If you have chosen a MariaDB version previous to 10.4.3, you won’t have this error, because by default, you have a database created available (as you can read in the official documentation of MariaDB). From this version and on, you need to execute the command: mysql_install_db, for installing everything you need to start the server.
There is a fundamental reason for this change, and that is that it is easy to modify the “engine” of MariaDB without seeing any altered data, and thus be able to include your configuration and databases directly.
Before starting to work, it is important to initialize the MariaDB server with the correct configuration. As with MySQL 8, we prepare a small initial configuration file, which is the same, but adjusting the directories:
Now, you can start the server with this command:
And now, the server is ready to use:
Starting script for MariaDB
Exactly as I did with MySQL 8, let’s use the same scripts but modified for MariaDb:
Let’s save this as start.bat for having a quick start.
And now, it is time to verify that the server is running:
And with this, I have already told you how to have available in USB both MariaDb and MySQL 8..