MIDAS Knowledge Base MIDAS Knowledge Base

How to install and configure MariaDB on Windows

This guide outlines how to install and configure MariaDB on Windows. MariaDB is a free, open-source relational database server, and a drop-in compatible fork of MySQL.

The steps below apply to current 64-bit editions of Windows, including Windows 10, Windows 11, and Windows Server (2016 onwards). A 32-bit package is also available for older systems.

This article forms part of our multipart series "How to install prerequisites needed for running a self-hosted edition of MIDAS from a Windows server", and applies to self-hosted installations of MIDAS booking software on Windows-based servers.

MIDAS requires either MySQL or MariaDB to be installed; this guide covers MariaDB (instructions on how to deploy MySQL on Windows are also available). It assumes that you've already successfully completed our previous "How to install & configure Apache on a Windows server" guide.

Please note that this article is provided "as is" and is correct at time of writing. For further assistance installing/configuring MariaDB, please refer to the vendor's own documentation/support.

Contents:


Step 1 - Download MariaDB for Windows

MariaDB may be freely downloaded from MariaDB.org, and is provided for Windows as an MSI installer package.

Download page on MariaDB.org

When you click the "Download" button, you'll be prompted to select the appropriate file for your operating system. For 64-bit Windows systems (the most common), select the "Windows x86_64 MSI Package". For older 32-bit Windows systems, select the "Windows x86 MSI Package".

Select MariaDB download type

MariaDB is updated regularly, so the exact version offered will change over time. Simply download the current stable release.


Step 2 - Install MariaDB

Run the MariaDB Installer and read & accept the License Agreement. You'll then be prompted to select components to install and an installation location:

MariaDB Custom Install

As a bare minimum, you'll need to install the MariaDB server and Database Instance. If in doubt, you can simply install all selected components. The selectable components include the MariaDB server itself, the command-line client tools, and HeidiSQL (a graphical database client for Windows).

The installer will then ask you to set up a "root" password for your database server:

MariaDB set root password

Make a note of the root password you set here, as you'll need it to connect to your database server. We also recommend that you select the "use UTF8 as default server's character set" option.

Next, you'll be asked whether you wish to install MariaDB as a Windows Service. You should select this option to ensure that MariaDB automatically runs whenever your Windows machine is turned on. You should also enable the networking option to ensure that your MariaDB server is accessible via your network:

Install MariaDB as a Windows service

Next, you may be prompted to decide whether you wish to allow anonymous usage statistics to be collected. It is your choice whether you enable this option or not:

MariaDB anonymous usage statistics

Finally, the installer will inform you that it's ready to install MariaDB. Click "Install" to proceed:

MariaDB Ready To Install

The installer will then install MariaDB...

Installing MariaDB on Windows

...and inform you when installation is complete:

MariaDB installed on Windows


Step 3 - Verify and connect

With MariaDB installed, let's confirm the server is running and that you can connect to it.

Because you installed MariaDB as a Windows service, it should already be running, and will start automatically whenever Windows starts. You can confirm this from a Command Prompt:

net start MariaDB
If the service is already running, Windows will simply tell you so. (You can also check, start, or stop it from the Windows "Services" panel: press WinKey + R, type "services.msc", and look for the "MariaDB" service.)

Next, connect to your new database server using the MariaDB command-line client. The installer adds a "MariaDB Command Prompt" shortcut to your Start menu, or you can open a standard Command Prompt and enter:

mariadb -u root -p
(On older versions of MariaDB this client is named "mysql" rather than "mariadb".) Enter the root password you set during installation when prompted.

Once connected, run a quick test to confirm everything is working:

SELECT VERSION();
MariaDB will report the version it's running, which confirms the server is installed and accepting connections. Type "exit" to leave the client.

If you'd prefer a graphical tool, the Windows installer also bundles HeidiSQL, a free GUI client for managing your MariaDB databases. You'll find it in your Start menu after installation.

By default, MariaDB listens on port 3306, and its configuration file (my.ini) is located in the "data" subfolder of your MariaDB installation. You won't normally need to change either of these for a standard MIDAS setup.


Troubleshooting

If MariaDB doesn't behave as expected after installation, the cause is usually one of the following:

The MariaDB service won't start, or you see "Can't connect to MySQL server on 'localhost'"

This means the MariaDB service isn't running. Open the Windows "Services" panel (services.msc) and start the "MariaDB" service, or run "net start MariaDB" from an administrative Command Prompt. If the service starts and then immediately stops again, check the error log (a ".err" file) in MariaDB's "data" folder, which will usually identify the cause.

"Access denied for user 'root'@'localhost'"

The root password being supplied doesn't match the one set during installation. Re-enter the correct password. If you've forgotten it, MariaDB's own documentation explains how to safely reset the root password.

Port 3306 is already in use

If you already have another MySQL or MariaDB instance installed, the default port (3306) may already be taken. Either stop the conflicting service, or change the "port" setting in MariaDB's my.ini configuration file and restart the MariaDB service.

"'mariadb' is not recognized as an internal or external command"

The MariaDB "bin" folder isn't on your system PATH. Use the "MariaDB Command Prompt" shortcut that the installer added to your Start menu, or add the bin folder (for example "C:\Program Files\MariaDB 11.4\bin") to your system PATH.


MariaDB FAQs

Is MariaDB free?

Yes. MariaDB is a free, open-source database server.

MariaDB or MySQL, which should I use for MIDAS?

Either works. MariaDB is a drop-in compatible fork of MySQL, and MIDAS supports both. If you don't already run one of them, MariaDB is a straightforward choice. We also have a guide to installing MySQL on Windows.

Which versions of Windows does MariaDB support?

Current MariaDB releases run on Windows 10, Windows 11, and Windows Server (2016 onwards). A 32-bit (x86) package is available for older systems, as described in Step 1.

How do I start or stop MariaDB on Windows?

MariaDB installs as a Windows service. Start or stop it with "net start MariaDB" or "net stop MariaDB" from an administrative Command Prompt, or from the Windows Services panel (services.msc).

Does MariaDB include a client?

Yes. A command-line client is installed alongside the server, and the Windows installer also bundles HeidiSQL, a free graphical client for managing your databases.

What's the next step for MIDAS?

Once MariaDB is installed, you'll need to create a database for MIDAS to use. See our guide on how to create a MariaDB database.


Also In This Series...



Further Reading


← Return to the Knowledge Base