Installing MariaDB Server on Windows provides a local, reliable SQL backend for development and testing, avoiding “works on one machine” surprises when an app expects a database.
On Windows, MariaDB is commonly deployed using the official .msi installer, which can install the server, client utilities (mariadb.exe/mysql.exe, mysqldump.exe), and optionally create a Database instance backed by a data directory under the installation root.
Administrative privileges are required to register the Windows service and write under Program Files, and the installer prompts for security-sensitive settings like the root password, remote root access, and whether TCP/IP networking is enabled on port 3306.
Steps to install MariaDB server on Windows:
- Download the MariaDB Community Server .msi installer.
https://mariadb.org/download/
Select Operating System: Windows and download the x64 .msi package.
- Run the downloaded .msi installer as administrator.
- Click Next on the Welcome screen.
- Accept the license agreement and click Next.
- Keep Database instance enabled in Custom Setup and click Next.
Default data directory location is data under the installation root unless changed in the feature tree.
- Choose the installation directory and click Next.
Default path is typically C:\Program Files\MariaDB <version>\.
- Set a strong root password, keep the anonymous account disabled, and disable remote root access.
Enabling remote root access expands attack surface and increases the blast radius of a leaked password.
- Enable Install as service and keep the service name set to MariaDB.
In MariaDB 10.4+ MSI installs, the default service name is MariaDB.
- Enable Networking and keep the port set to 3306.
Remote clients require a Windows firewall rule for port 3306 and explicit GRANTs for non-local hosts.
- Start the installation by clicking Install.
- Exit the installer by clicking Finish.
- Open Command Prompt.
- Confirm the MariaDB service is running.
C:\> sc query MariaDB SERVICE_NAME: MariaDB TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0Replace MariaDB with the configured service name when a custom name was set in the installer.
- Print the installed client version.
C:\> "C:\Program Files\MariaDB 12.1\bin\mariadb.exe" --version mariadb Ver 15.1 Distrib 12.1.2-MariaDB, for Win64 (AMD64)
Replace the version segment in the path when a different MariaDB version or install directory is used.
- Connect to the local server as root over TCP.
C:\> "C:\Program Files\MariaDB 12.1\bin\mariadb.exe" --user=root --password --host=127.0.0.1 --port=3306 Enter password: ******** Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 12.1.2-MariaDB MariaDB Server Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- Verify server responsiveness by querying the server version.
MariaDB [(none)]> SELECT VERSION(); +----------------+ | VERSION() | +----------------+ | 12.1.2-MariaDB | +----------------+ 1 row in set (0.00 sec)
- Create a dedicated database and local user for applications.
MariaDB [(none)]> CREATE DATABASE appdb; Query OK, 1 row affected (0.01 sec) MariaDB [(none)]> CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'StrongPassword!ChangeMe'; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON appdb.* TO 'appuser'@'localhost'; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)
Using a dedicated user avoids running application connections with full root privileges.
- List configured root account host entries.
MariaDB [(none)]> SELECT User, Host FROM mysql.user WHERE User='root'; +------+-----------+ | User | Host | +------+-----------+ | root | localhost | | root | 127.0.0.1 | | root | ::1 | +------+-----------+ 3 rows in set (0.00 sec)
- Confirm anonymous accounts are absent.
MariaDB [(none)]> SELECT User, Host FROM mysql.user WHERE User=''; Empty set (0.00 sec)
- Confirm the test database is absent.
MariaDB [(none)]> SHOW DATABASES LIKE 'test'; Empty set (0.00 sec)
- Exit the MariaDB client.
MariaDB [(none)]> exit Bye
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.
