Brazil's biggest MU Online portal — since 2003
Tutorial Intermediate Server

How to set up SQL Server for MU Online

Complete guide to configuring SQL Server for a MU Online server: restoring the MuServer databases (MuOnline, EventMU, RankingMU, LogServer), the correct collation that prevents character encoding issues, creating a dedicated SQL login with the right permissions, configuring ODBC Data Source Names (DSNs) so MuServer components can reach the database, the mandatory connection test before starting any game server component, reading and interpreting connection errors, enabling automatic startup so the database starts with Windows, and the three most common SQL configuration mistakes that cause Connect Fail.

GA Gabriel · Updated on Jan 8, 2026 · ⏱ 12 min read
Quick answer

SQL Server is the foundation every MU Online server is built on. Before any game component starts, the databases must be restored, the user must be created, and the ODBC connections must be validated.

SQL Server is the foundation every MU Online server is built on. Before any game component starts, the databases must be restored, the user must be created, and the ODBC connections must be validated.

Nota: This tutorial covers SQL Server configuration after installation. See the SQL Server 2008 R2 installation tutorial first if you haven't installed SQL Server yet.

Databases in a MU Online server

THE 4 MU DATABASES:

MuOnline (MAIN):
→ Contains: MEMB_INFO (accounts), Character, Inventory, Guild, GuildMember
→ All daily gameplay reads and writes go through this database
→ Most critical — lose this and lose all player data

EventMU:
→ Contains: Blood Castle, Devil Square, Chaos Castle, Castle Siege records
→ Event scheduling data, event rankings
→ If this is missing: events may fail to start or restart incorrectly

RankingMU:
→ Contains: PK ranking, duel ranking, overall rankings
→ Updated by the GameServer periodically
→ Website ranking page reads from here

LogServer:
→ Contains: connection logs, action logs, error logs
→ Used for debugging and player dispute investigations
→ Optional for initial testing, but important for production

BACKUP FORMAT:
→ Distributions usually come as .bak (SQL Server backup) or .sql (T-SQL scripts)
→ .bak: restored via SSMS Restore Database dialog
→ .sql: executed via SSMS query window or sqlcmd

Restoring the databases in SSMS

RESTORATION PROCEDURE:

OPEN SSMS AND CONNECT:
1. Start Menu → SQL Server Management Studio
2. Server name: localhost (or . or SERVERNAME\MSSQLSERVER)
3. Authentication: SQL Server Authentication
4. Login: sa | Password: [the password from installation]
5. Click Connect

RESTORE FROM .BAK FILE:
1. In Object Explorer: right-click "Databases" → "Restore Database..."
2. Source: "Device" → click the [...] button
3. Click "Add" → navigate to the .bak file → OK
4. The database name auto-fills from the backup
5. Options tab: tick "Overwrite the existing database" (if re-restoring)
6. OK → "Restore of database 'MuOnline' completed successfully"

REPEAT FOR: EventMU, RankingMU, LogServer

RESTORE FROM .SQL FILE:
1. File → Open → File → select the .sql file
2. Verify you're connected to the correct database at the top
3. F5 or the Execute button to run the script

VERIFY ALL 4 DATABASES EXIST:
→ Refresh the Databases folder in Object Explorer
→ Should show: MuOnline, EventMU, RankingMU, LogServer

Setting the correct collation

COLLATION MATTERS FOR CHARACTER ENCODING:

WHY COLLATION IS IMPORTANT:
→ Collation defines how SQL Server sorts and compares text
→ Wrong collation = broken special characters in player names and chat
→ S6 distributions are written for: SQL_Latin1_General_CP1_CI_AS

SET COLLATION ON EACH DATABASE:
-- Check current collation:
SELECT name, collation_name FROM sys.databases WHERE name = 'MuOnline';

-- If not SQL_Latin1_General_CP1_CI_AS, change it:
ALTER DATABASE MuOnline COLLATE SQL_Latin1_General_CP1_CI_AS;
ALTER DATABASE EventMU  COLLATE SQL_Latin1_General_CP1_CI_AS;
ALTER DATABASE RankingMU COLLATE SQL_Latin1_General_CP1_CI_AS;
ALTER DATABASE LogServer COLLATE SQL_Latin1_General_CP1_CI_AS;
-- Note: changing collation requires no active connections to the database

INSTANCE COLLATION:
→ Set during SQL Server installation (can't be changed after easily)
→ Recommendation during install: SQL_Latin1_General_CP1_CI_AS
→ CI = Case Insensitive (player names work in any case)
→ AS = Accent Sensitive

Creating the dedicated SQL login

CREATE A DEDICATED USER (do not use sa in MuServer configs):

IN SSMS, OPEN A NEW QUERY (CTRL+N) AND RUN:

-- Step 1: Create the login at the server level
CREATE LOGIN mu_server
WITH PASSWORD = 'MuServerPass2024!',
     DEFAULT_DATABASE = MuOnline,
     CHECK_EXPIRATION = OFF,
     CHECK_POLICY = OFF;

-- Step 2: Grant to MuOnline
USE MuOnline;
CREATE USER mu_server FOR LOGIN mu_server;
EXEC sp_addrolemember 'db_owner', 'mu_server';

-- Step 3: Grant to EventMU
USE EventMU;
CREATE USER mu_server FOR LOGIN mu_server;
EXEC sp_addrolemember 'db_owner', 'mu_server';

-- Step 4: Grant to RankingMU
USE RankingMU;
CREATE USER mu_server FOR LOGIN mu_server;
EXEC sp_addrolemember 'db_owner', 'mu_server';

-- Step 5: Grant to LogServer
USE LogServer;
CREATE USER mu_server FOR LOGIN mu_server;
EXEC sp_addrolemember 'db_owner', 'mu_server';

WHY NOT USE sa:
→ sa has maximum server privileges — a compromised sa = full server compromise
→ mu_server has db_owner on the 4 MU databases only (still appropriate, minimal blast radius)
→ Write the mu_server password down — you'll need it in every .ini config file

Configuring ODBC DSNs (critical step)

ODBC CONFIGURATION — USE THE 32-BIT ADMIN:

OPEN THE CORRECT ODBC ADMINISTRATOR:
→ WRONG: Control Panel → Administrative Tools → ODBC Data Sources (64-bit)
→ CORRECT: Press Win+R → type: C:\Windows\SysWOW64\odbcad32.exe → OK
           (32-bit ODBC admin, needed because MuServer is 32-bit)

CREATING THE MUONLINE DSN:
1. In odbcad32.exe → "System DSN" tab
2. Click "Add" → select "SQL Server" → click "Finish"
3. Name: MuOnline (exact name — MuServer .ini files reference this name)
4. Description: MuOnline Game Database (optional)
5. Server: (local) or localhost
6. Click Next → select "SQL Server authentication with login id and password"
7. Login ID: mu_server | Password: [the password you created]
8. Click Next → check "Change the default database to:" → select: MuOnline
9. Click Next → click "Finish" → click "Test Data Source"

RESULT: "Tests completed successfully" → click OK

REPEAT FOR THE OTHER DATABASES:
→ Name: EventMU   → database: EventMU
→ Name: RankingMU → database: RankingMU
→ Name: LogServer → database: LogServer

DSN NAMES MUST MATCH EXACTLY:
→ Open each MuServer .ini config file and look for: DSN= or DataSourceName=
→ The name you typed in ODBC must match exactly (case-sensitive)
→ If your distribution uses "muonline" (lowercase), type "muonline" — not "MuOnline"
Atenção: The 32-bit ODBC administrator is the most commonly skipped step and the cause of many unexplained DataServer startup failures. If DataServer shows a connection error even though SSMS connects fine, check that you created the DSNs in odbcad32.exe (C:\Windows\SysWOW64\odbcad32.exe), not in the 64-bit ODBC admin from Control Panel.

Configure SQL Server for automatic startup

AUTOMATIC STARTUP WITH WINDOWS:

WHY IT MATTERS:
→ After a server reboot (VPS maintenance, power failure), SQL Server must start automatically
→ If it doesn't: every MuServer component that depends on the DB will fail
→ Manual restart requires VPS access and delays recovery

CONFIGURE IN WINDOWS SERVICES:
1. Win+R → services.msc → OK
2. Find: "SQL Server (MSSQLSERVER)"
3. Right-click → Properties
4. "Startup type" → "Automatic" (not "Automatic (Delayed Start)" — the delay can cause MuServer to start before SQL is ready)
5. Click Apply → OK

CREATE A STARTUP ORDER (optional, recommended):
→ SQL Server starts automatically
→ MuServer components should start after SQL is ready
→ Simplest method: create a .bat file that starts MuServer components
   and add it to Windows Task Scheduler (triggered at startup with a 30-second delay)
→ More advanced: install MuServer components as Windows Services

Validating the connection before starting the game server

PRE-LAUNCH CHECKLIST:

BEFORE STARTING ANY MUSERVER COMPONENT, VERIFY:

☐ SQL Server service is RUNNING:
   → services.msc → "SQL Server (MSSQLSERVER)" → Running

☐ SSMS can connect with sa or mu_server credentials:
   → Test from SSMS: connect, expand Databases, see all 4 databases

☐ TCP/IP is enabled on port 1433:
   → SQL Server Configuration Manager → Protocols → TCP/IP → Enabled
   → Port in IPAll: 1433

☐ All 4 ODBC DSNs pass "Test Data Source":
   → C:\Windows\SysWOW64\odbcad32.exe → System DSN → test each one

☐ Firewall: port 1433 is NOT open to the internet:
   → Only localhost access needed — the game server and SQL run on the same machine
Dica: After restoring databases for the first time, run some basic SQL queries to verify the data is there: SELECT COUNT(*) FROM MuOnline.dbo.Character; should return 0 for a fresh database (no players yet). If it returns an error, the restore failed or the user permissions are wrong.

Continue with the MuServer configuration tutorial (connecting the game components to these databases using the DSN names), the common errors tutorial (diagnosing SQL connection failures when the game server won't start), and the backup tutorial (automating backups of the MuOnline, EventMU, RankingMU, and LogServer databases).

Frequently asked questions

Which SQL Server version should I use for MU Online?

SQL Server 2008 R2 is the most tested and recommended version for Season 6 servers. Most S6 distributions were compiled and tuned specifically for SQL 2008 R2, and the stored procedures are guaranteed compatible. For classic servers (0.97/0.99), SQL Server 2000 with SP4 may be required. For modern distributions (S7+), SQL Server 2017 or 2019 can be used with the compatibility level set to 100 (SQL 2008 mode).

What databases does MU Online use?

A standard S6 installation uses 4 databases: MuOnline (the main game database — accounts, characters, items, guilds), EventMU (Blood Castle, Devil Square, Chaos Castle, Castle Siege data), RankingMU (PK ranking, duel ranking, castle ranking), and LogServer (game logs). All four must be restored and all four need ODBC DSNs pointing to them.

What is an ODBC DSN and why does MuServer need it?

DSN stands for Data Source Name — a Windows system entry that stores a database connection configuration (server address, database name, username, password). MuServer components (DataServer, JoinServer, EventServer) use DSN names to connect to SQL Server instead of using a direct connection string. If a DSN is missing or misconfigured, the corresponding MuServer component fails to start.

What is the right ODBC version to use for MuServer?

Always use the 32-bit ODBC Administrator, even on a 64-bit system. MuServer components are 32-bit executables, so they read 32-bit DSNs. The path for the 32-bit ODBC admin is: C:\\Windows\\SysWOW64\\odbcad32.exe. The default ODBC admin launched from Control Panel on 64-bit Windows is the 64-bit version — MuServer will NOT see the DSNs created there.

GA
Guides & builds editor

Gabriel covers gameplay, class builds, PvP and progression. He tests every strategy on a live server before publishing.

Keep reading

Related articles

🗄️
Tutorial

How to install SQL Server 2000 for a classic MU Online server

Complete guide to installing SQL Server 2000 for old MU Online distributions (versions 0.97 and 0.99): when SQL Server 2000 is the right choice vs SQL Server 2008 R2, why SQL 2000 has compatibility issues on modern Windows and the recommended virtual machine approach, step-by-step installation on Windows XP/2003 (in VMware or VirtualBox), why Service Pack 4 (SP4) is absolutely mandatory, how to configure Mixed Mode authentication for MuServer connectivity, the Enterprise Manager and Query Analyzer tools included with SQL 2000, how to import the classic MU databases (.bak files), what to do when the installation fails on modern Windows, and the migration path from SQL 2000 to SQL 2008 R2 if your distribution supports it.

12 min · Advanced ·
🗄️
Tutorial

Install SQL Server 2014/2017/2019 for MU Online

Complete guide to installing modern SQL Server versions (2014, 2017, 2019) for MU Online: when modern SQL is the right choice vs SQL Server 2008 R2, the Express vs Developer vs Standard edition comparison, the full installation walkthrough with the critical Mixed Mode authentication step, why SSMS is now a separate download and how to get it, enabling TCP/IP in Configuration Manager, database compatibility levels for running classic S6 distributions on modern SQL (setting level 100 for SQL 2008 compatibility), creating the MuServer login user with T-SQL, and the most common compatibility problems when migrating a classic distribution from SQL 2008 to SQL 2019.

12 min · Intermediate ·
🗄️
Tutorial

How to install SQL Server 2008 R2 for MU Online

Complete guide to installing SQL Server 2008 R2 for a MU Online server: why it's the most compatible version for Season 6 distributions, the difference between the Express, Standard, and Enterprise editions, the full installation walkthrough (7 steps with the critical Mixed Mode authentication step explained), how to install and use SSMS (SQL Server Management Studio), enabling the TCP/IP protocol and setting port 1433 in SQL Server Configuration Manager, configuring the SQL Server Browser service, creating the SQL Server user that MuServer will connect with, the most common installation errors and fixes, and verifying the installation is working correctly before configuring the MuServer.

12 min · Intermediate ·