Setting up MariaDB on Windows is quick and easy. This guide walks you through the steps to download the installer, configure MariaDB and manage it with a graphical tool like HeidiSQL.

Why use MariaDB on Windows?

Windows is widely used in many businesses and development environments. MariaDB runs reliably on Windows, providing the same functionality as it does on Linux. If you need to run web applications locally or want a familiar development environment, integrating MariaDB on Windows is a simple solution.

What are the requirements for running MariaDB on Windows?

  • Windows 10 or 11 (64-bit recommended)
  • Administrator rights for the installation
  • Internet access to download the installer
  • Optional: HeidiSQL (recommended for graphical management)
Managed Databases
Time-saving database services
  • Enterprise-grade architecture managed by experts
  • Flexible solutions tailored to your requirements
  • Hosted in the UK under strict data protection legislation

How to install MariaDB on Windows step by step

The installation process is straightforward, with an official installer that guides you through each step. This tutorial covers the entire process.

Step 1: Download the installer

  1. Go to the download section of the MariaDB website.

  2. On the page, select MariaDB Community Server and then click the Windows (MSI Installer) option.

  3. Download the latest version, such as MariaDB 11.7 for Windows x64. Be sure to select the correct architecture for your system.

Step 2: Installation with the MSI package

  1. Launch the downloaded MSI installer by double-clicking on it.

  2. On the welcome screen, click Next to begin the setup.

  3. Accept the licence terms by checking I accept the terms, then click Next.

  4. In the Custom Setup section, choose the components you want to include. For a simple test environment, you can deselect third-party tools especially if you plan to install HeidiSQL manually.

  5. Select the installation directory. The default is C:\Program Files\MariaDB x.x. You can change this if you prefer a different location.

Step 3: Server configuration

  1. Set a secure root password for your MariaDB server. You’ll need this to log in as an administrator later.

  2. Enable the Use utf8mb4 as default server’s character set option to ensure the database supports modern character sets.

  3. Leave other settings such as the port (3306), Windows service startup and use of the InnoDB engine at their default values, unless you have specific requirements.

  4. Click Install to begin the installation. This will take about one to three minutes depending on your system.

Step 4: Test MariaDB Windows installation

  1. After installation, open the Windows Command Prompt (cmd).

  2. Run the following command to connect to your MariaDB instance:

"C:\Program Files\MariaDB 11.7\bin\mariadb.exe" -u root -p
cmd
  1. Enter the root password you set earlier. After successfully logging in, the MariaDB console will open and you can run SQL commands.

Step 5: Install HeidiSQL

  1. Go to the HeidiSQL website.

  2. Download the latest setup and install it as usual.

  3. When you first open HeidiSQL, the connection manager will appear. Click New to create a new connection.

  4. Enter the following connection details:

  • Connection Name: for example, ‘Local MariaDB’
  • Connection Type: MariaDB or MySQL (TCP/IP)
  • Library: libmariadb.dll
  • Hostname/IP: 127.0.0.1
  • Username: root
  • Password: the root password set in step 3
  • Port: 3306
  1. Click Save to save the connection, then click Open to connect. You should now have access to your database instance.

Step 6: Create database

  1. Open HeidiSQL and connect to your MariaDB server.

  2. Right-click on your connection in the navigation pane on the left and select Create New -> Database.

  3. Enter a name for your new database, for example, __testdb__, and click OK. The new database will appear in the list and is ready for use.

Step 7: Restore backup

  1. Select the database from the left panel where you want to import a backup.

  2. Open the File menu -> Run SQL file.

  3. In the file selection dialog, choose your desired .sql file and click Open.

  4. HeidiSQL will run the SQL commands from the file. After a few moments, your database structure and data will be imported.

Step 8: Adjust configuration file

  1. Go to the MariaDB installation directory in Windows, e.g., C:\Program Files\MariaDB 11.7\data.

  2. Open the my.ini file with a text editor of your choice. Be sure to run the editor with administrative privileges.

  3. Make any necessary adjustments. For example, you can change the character set and the maximum number of simultaneous connections:

[server]
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
max_connections=200
ini
  1. Save the file and restart the MariaDB service to apply the changes:
net stop mariadb
net start mariadb
cmd

Your MariaDB environment on Windows is now fully set up and ready to use.

Was this article helpful?
Go to Main Menu