How to Install and Configure a Database Server in Windows Server


This guide covers database server Windows Server step by step, with every setting in the order you will use it. Applications like WordPress, ERPs and lab web apps all need somewhere to keep their data. On Windows Server you have two main routes: Microsoft SQL Server (the enterprise native option) or MySQL/MariaDB, which is free and perfect for learning SQL. This guide walks through the MySQL/MariaDB route, the standard companion to the IIS web server.

database server Windows Server in a home lab

WINDOWS SERVERDATABASE SERVER WINDOWS SE…ENTERPRISE LABtimer 45 MIN LAB
NH
Nurul Huda AUTHORInfrastructure & Cloud Architect · Verified 2026

print Print Lab

● VALID ON THE CONFIG BELOW

dns LAB TOPOLOGY & PREREQUISITES

# example values used while writing and testing this guide

LAB VM

HypervisorESXi / Workstation
vCPU2
RAM4-8 GB
Disk60 GB thin

WINDOWS BUILD

EditionServer 2019 Std
InterfaceDesktop Experience
Adminlocal Administrator
IPstatic or DHCP

VALIDATION

RolesServer Manager
Firewalllab rules only
Snapshotbefore changes

01constructionDatabase server Windows Server: Step 1: Download and Install

Download the MySQL Community Installer (or the MariaDB MSI) and run it. Choose the Server only setup type for a dedicated database machine. During configuration, install MySQL as a Windows service so it starts automatically at boot, and set a strong root password.

02downloadStep 2: Secure the Installation

  • Keep the root account for administration only — create per-application accounts instead
  • Bind the service to the server’s internal IP if only lab machines need it
  • Open TCP port 3306 in Windows Firewall only for the subnet that needs access
  • Take the option to run MySQL as a dedicated low-privilege service account

In short, database server Windows Server works best when you follow the order above and verify each step.

03usbStep 3: Create a Database and a User

Connect with the MySQL command-line client: mysql -u root -p, then:

CREATE DATABASE appdb;
CREATE USER 'appuser'@'%' IDENTIFIED BY 'StrongPass!';
GRANT ALL ON appdb.* TO 'appuser'@'%';

Grant each application its own database and account — never share root for applications.

04terminalStep 4: Test Remotely

From a client machine (or your web server VM), test the connection: mysql -h db01 -u appuser -p. If it fails, check the firewall rule, the bind address in the server’s configuration file, and the user’s host specification.

Alternatives worth knowing: SQL Server Express is a free entry into the Microsoft ecosystem, and the same MySQL skills transfer directly to Ubuntu database servers and to managed cloud databases like AWS RDS. In short, database server Windows Server works best when you follow the order above and verify each step.

Related Content

▶ UP NEXT IN THE WINDOWS TRACK

How to Install and Configure a Mail Server in Windows Server (SMTP)

Finish this lab, then continue down the track. Each guide builds on the one before it.

rocket_launch Launch Next Lab