mariadb

LARAGON – Migrate to MariaDB

1. Introduction

By default Laragon, comes with MySQL installed. But migrating to MariaDB is not that difficult.

Use Laragons build-in Quick Add option to install MariaDB.

mariadb

2. Notice

Be sure your Windows 10 (64 bit) OS has the latest Visual C++ Redistributable for Visual Studio 2015-2019 installed.

3. What about the data?

This procedure will install MariaDB into your Laragon installation.
A new folder \LARAGON\data\mariadb-x.x\ wil be created.
It will not touch the existing MySQL database.

This means you’ll have to :

  1. export all existing databases BEFORE adding MariaDB
  2. import all exported databases AFTER installing MariaDB

4. Laragon - Add MariaDB

  • Go to MariaDB Downloads and select the version you want to install.
  • Filter the available downloads by selecting the Windows checkbox.
  • Then rightclick the mariadb-x.x.x-winx64.zip version and select Copy hyperlink.
  • In the Tools section, select Quick Add → Configuration. This will open the file \LARAGON\usr\packages.conf for editing.
  • Change the line # mariadb10.3=https://downloads.mariadb.org/f/mariadb-10.3.10/winx64-packages/mariadb-10.3.10-winx64.zip/from/http%3A//sgp1.mirrors.digitalocean.com/mariadb/?serve by replacing the hyperlink after the “=” sign with the hyperlink you previously copied from the MariaDB Downloads page.
  • Then adjust the MariaDB version just before the “=” sign to reflect the proper version.
  • Remove the “#” sign at the beginning of the line.
  • The result should look like mariadb10.5.9=https://downloads.mariadb.org/interstitial/mariadb-10.5.9/winx64-packages/mariadb-10.5.9-winx64.zip.
  • In Laragon, click the Stop button to stop all services.
  • In the Tools section, select Quick Add → mariadbx.x.x.
  • Wait for the installer to finish.
  • Laragon has now placed the MariaDB version in the folder \LARAGON\bin\mysql\
  • In the MySQL section, select Version → mariadbx.x.x.
  • In the Laragon Button Menu, click on the Start All button.
  • Laragon has now created a new data folder \LARAGON\data\mariadb-x.x\

5. Inspecting the new database

In case you have not yet added phpMyAdmin to your Laragon installation, do so now by folowing the instructions in this post.

  • In the Laragon Button Menu, click on the Database button.
  • In a fresh Laragon installation, the default user is root  and the password is not set.
  • Select your preferred language and log in to phpMyAdmin.
  • phpMyAdmin may complain about the phpMyAdmin configuration storage not being completely configured.
  • Inside the warning, click on the link Find out why.

  • Inside de next notice, click on the link Create.

  • phpMyAdmin will then create and configure the database named phpmyadmin.

  • Click on the Home button. The warning should be gone now.

You have now installed MariaDB into your Laragon installation.

You can now start importing your databases.

After succesful import and testing, you can delete the obsolete mySQL folders in :

  • \LARAGON\bin\mysql\
  • \LARAGON\data\

6. Character Set and Collation

In some cases you might want to configure the MariaDB UTF 8 settings by specifying the character set and the collation.

In my case, the preferred character set is utf8mb4 and the collation is utf8mb4_unicode_ci.

If you want to force MariaDB to use this settings, you’ll have to add them to these 2 files :

  • \LARAGON\bin\mysql\mariadb-10.5.9-winx64\my.ini
  • \LARAGON\usr\tpl\MySQL.my.ini.tpl

In both files, add the settings to the [mysqld] section :

##UTF 8 Settings
character_set_server=utf8mb4
collation_server=utf8mb4_unicode_ci

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.