Brazil's biggest MU Online portal — since 2003
Tutorial Advanced Tutoriais

How to Restore Corrupted or Invalid Data Character in MU

Advanced guide to diagnose and restore characters with corrupted data in MU Online's SQL database, covering inventory, map position, and stats.

VI ViciadosMU Team · Updated on 3 jul 2026 · ⏱ 12 min read

Problem Overview

Corrupted characters are one of the most critical incidents in MU Online server administration. Corruption can occur due to power failure during a save operation, GameServer crash, incorrect manual database editing, external attack, or a version-specific bug. The practical result is a character that crashes the GameServer on load, often blocking access to the entire account.

This guide covers complete diagnosis and restoration procedures for Season 6 servers (MuServer S6 EP3) running SQL Server 2008, 2012, 2014, or 2019.

Atenção: Take a full database backup before making any changes. Run: BACKUP DATABASE MuOnline TO DISK = 'C:\Backups\MuOnline_before_restore.bak' WITH COMPRESSION, STATS = 10

Step 1 — Identify the Problematic Character

1.1 Open the GameServer error log. The default path is:

GameServer\Logs\Error\Error_YYYYMMDD.log
GameServer\Logs\GMCommand\GMCommand_YYYYMMDD.log

1.2 Filter for critical error keywords:

[Error] Character Load Failed - CharName: Player01
[Error] Invalid Map Position - Map:255 X:0 Y:0
[Error] Inventory data corrupted - AccountID: account01
[Error] Exception in CharacterLoad() - Overflow or invalid data

1.3 Confirm in SQL Server Management Studio (SSMS) that the character record exists:

USE MuOnline;
SELECT Name, AccountID, Class, cLevel, MapNumber, MapPosX, MapPosY, ConnectStat
FROM Character
WHERE Name = 'Player01';
Nota: The ConnectStat field must be 0 when the character is offline. If it shows 1 while the server is running and nobody is connected, the character is stuck as "online" — this alone can block login.

Step 2 — Reset a Stuck Connection State

Before any deeper intervention, resolve any pending connection state:

USE MuOnline;

-- Force character offline
UPDATE Character
SET ConnectStat  = 0,
    ChatLimitTime = 0
WHERE Name = 'Player01';

-- Force account offline
UPDATE MEMB_STAT
SET ConnectStat = 0,
    ServerName  = '',
    IP          = ''
WHERE memb__id = 'account01';

Restart the GameServer and test login. If the problem persists, move to Step 3.


Step 3 — Fix an Invalid Map Position

An invalid map or position (e.g., MapNumber=255, coordinates X=0 Y=0, or a non-existent map ID) is the most common cause of crash on character load.

Lorencia is the safest destination for teleportation: MapNumber=0, X=125, Y=125.

USE MuOnline;

UPDATE Character
SET MapNumber = 0,
    MapPosX   = 125,
    MapPosY   = 125,
    Dir       = 1
WHERE Name = 'Player01';

Quick reference for valid maps in Season 6:

MapNumberMap NameSafe XSafe Y
0Lorencia125125
1Dungeon107247
2Devias19735
3Noria17199
7Atlans1515
10Crywolf Fortress8790
56Kanturu Relics3927
Dica: If your server uses custom maps, verify valid IDs in GameServer\Data\World\WorldSetting.xml or the WZ_WORLD table depending on your MuServer version.

Step 4 — Diagnose and Clear a Corrupted Inventory

The inventory is stored as binary data (BLOB/Image) in the Inventory column of the Character table. A single out-of-range byte can crash the entire load routine.

4.1 Check the size of the inventory data:

USE MuOnline;

SELECT Name,
       DATALENGTH(Inventory) AS InventorySize,
       DATALENGTH(MagicList)  AS MagicListSize,
       DATALENGTH(Quest)      AS QuestSize
FROM Character
WHERE Name = 'Player01';

Expected sizes for Season 6:

  • Inventory: exactly 7168 bytes (112 slots x 64 bytes per item)
  • MagicList: typically between 256 and 2048 bytes
  • Quest: typically 4096 bytes

4.2 If the size is wrong, clear the inventory with a properly sized zeroed blob:

USE MuOnline;

-- Zero the inventory (loses items but restores login access)
UPDATE Character
SET Inventory = CAST(REPLICATE(CHAR(0xFF), 7168) AS VARBINARY(7168))
WHERE Name = 'Player01';
Atenção: The byte 0xFF represents an empty slot in the MuServer Season 6 protocol. Use 0x00 only if your server version uses a different convention — consult your specific version's protocol documentation.

4.3 To also clear a corrupted skill list:

USE MuOnline;

UPDATE Character
SET MagicList = CAST(REPLICATE(CHAR(0xFF), 1152) AS VARBINARY(1152))
WHERE Name = 'Player01';

Step 5 — Restore Invalid Stats

Stats with values outside the allowed range cause integer overflow inside the server logic.

5.1 Check the current stats:

USE MuOnline;

SELECT Name, Class, cLevel,
       Strength, Dexterity, Vitality, Energy, Leadership,
       LevelUpPoint, Life, MaxLife, Mana, MaxMana
FROM Character
WHERE Name = 'Player01';

5.2 If any value is negative or unrealistically large (e.g., Strength=65535 or -1), reset to the class base values:

USE MuOnline;

-- Example for Dark Knight (Class=0) corrected to level 1 base
UPDATE Character
SET Strength      = 28,
    Dexterity     = 20,
    Vitality      = 25,
    Energy        = 10,
    Leadership    = 0,
    LevelUpPoint  = 0,
    Life          = 110,
    MaxLife       = 110,
    Mana          = 40,
    MaxMana       = 40,
    cLevel        = 1,
    Experience    = 0
WHERE Name = 'Player01';

Base stats per class (Season 6 defaults):

ClassClassSTRDEXVITENE
Dark Knight028202510
Dark Wizard118181530
Fairy Elf222252015
Magic Gladiator326262616
Dark Lord426202015
Summoner518181823
Rage Fighter632272510

Step 6 — Check and Fix Auxiliary Data

Beyond the Character table, other related records may also be corrupted:

6.1 Clear a corrupted warehouse:

USE MuOnline;

-- Check warehouse size
SELECT StoreName, DATALENGTH(Items) AS WarehouseSize
FROM warehouse
WHERE StoreName = 'account01';

-- Zero the warehouse if corrupted (loses stored items)
UPDATE warehouse
SET Items = CAST(REPLICATE(CHAR(0xFF), 7680) AS VARBINARY(7680)),
    Money = 0
WHERE StoreName = 'account01';

6.2 Remove orphaned Blood Castle / Devil Square records that may block the character:

USE MuOnline;

DELETE FROM BC_UserData    WHERE Name = 'Player01';
DELETE FROM DS_UserData    WHERE Name = 'Player01';
DELETE FROM CC_UserData    WHERE Name = 'Player01';
DELETE FROM T_OfflineStore WHERE CharName = 'Player01';

6.3 Check and fix a guild record if needed:

USE MuOnline;

-- Remove character from corrupted guild entry
UPDATE GuildMember
SET G_Name   = '',
    G_Level  = 0,
    G_Status = 0
WHERE Name = 'Player01';

Step 7 — Restore From Backup

If the corruption is severe, the best solution is to restore only the affected character's data from a recent backup.

7.1 Restore the backup to a temporary database:

RESTORE DATABASE MuOnline_Backup
FROM DISK = 'C:\Backups\MuOnline_20240115_0600.bak'
WITH MOVE 'MuOnline'     TO 'C:\SQL\MuOnline_Backup.mdf',
     MOVE 'MuOnline_log' TO 'C:\SQL\MuOnline_Backup_log.ldf',
     NORECOVERY, STATS = 10;

RESTORE DATABASE MuOnline_Backup WITH RECOVERY;

7.2 Copy only the specific character's data from the restored database:

-- Restore Character row
UPDATE MuOnline..Character
SET Inventory    = B.Inventory,
    MagicList    = B.MagicList,
    MapNumber    = B.MapNumber,
    MapPosX      = B.MapPosX,
    MapPosY      = B.MapPosY,
    Strength     = B.Strength,
    Dexterity    = B.Dexterity,
    Vitality     = B.Vitality,
    Energy       = B.Energy,
    cLevel       = B.cLevel,
    Experience   = B.Experience,
    LevelUpPoint = B.LevelUpPoint
FROM MuOnline..Character A
JOIN MuOnline_Backup..Character B ON A.Name = B.Name
WHERE A.Name = 'Player01';

-- Restore warehouse
UPDATE MuOnline..warehouse
SET Items = B.Items,
    Money = B.Money
FROM MuOnline..warehouse A
JOIN MuOnline_Backup..warehouse B ON A.StoreName = B.StoreName
WHERE A.StoreName = 'account01';

Step 8 — Final Validation

After all corrections, run this checklist before restarting the GameServer:

USE MuOnline;

-- Validation checklist
SELECT
    Name,
    ConnectStat,
    MapNumber,
    MapPosX,
    MapPosY,
    cLevel,
    Strength,
    Dexterity,
    Vitality,
    Energy,
    DATALENGTH(Inventory) AS InventoryBytes,
    DATALENGTH(MagicList) AS MagicListBytes
FROM Character
WHERE Name = 'Player01';

Confirm:

  • ConnectStat = 0
  • MapNumber between 0 and 255 with a value recognized by the server
  • MapPosX and MapPosY both > 0
  • DATALENGTH(Inventory) = 7168 (Season 6)
  • All stats are positive and within the range 0–65534
Dica: After restoring, ask the player to fully close and relaunch the client before logging in. Cached sessions may use stale data and cause an error even after the database fix is applied.

Restart the GameServer and monitor GameServer\Logs\Error\ for 5 minutes after the restored character logs in to confirm no new related errors appear.

Perguntas frequentes

How do I identify a corrupted character?

Common signs: server crash when loading that character, 'Character load failed' message, character appearing invisible on the server, 'Invalid map position' errors in GameServer logs, or inventory that refuses to load. Check GameServer/Logs/Error/ for the specific CharName causing errors.

Which SQL table stores character data in Season 6?

The main table is Character in the MuOnline database. It contains columns such as Name, AccountID, Class, cLevel, LevelUpPoint, Strength, Dexterity, Vitality, Energy, Leadership, MapNumber, MapPosX, MapPosY, Inventory, MagicList, and Life.

Can I restore a character's inventory without a backup?

Without a full backup it is impossible to recover the original items. You can, however, clear the corrupted inventory by setting the Inventory column to a zeroed blob, which re-enables login but results in empty inventory.

The character gets stuck on an invalid map after restoring. What do I do?

Run UPDATE MuOnline..Character SET MapNumber=0, MapPosX=125, MapPosY=125 WHERE Name='CharName' to teleport to Lorencia (MapNumber=0). If the problem persists, verify that the configured map ID exists in GameServer/Data/World/.

How can I prevent data corruption in the future?

Configure automatic backups with SQL Server Agent by scheduling a job to run BACKUP DATABASE MuOnline TO DISK every 6 hours. Also enable FULL recovery mode on the MuOnline database and retain transaction logs for point-in-time recovery.

VI

ViciadosMU Team

Equipe editorial do ViciadosMU — portal de MU Online no ar desde 2003.

Keep reading

Related articles

🖥️
Tutorial

How to Migrate and Optimize the SQL Database on Your MU Server

Step-by-step guide to safely migrating and optimizing your MU Online SQL Server database for better performance, stability, and long-term maintainability.

18 min · Advanced
🛡️
Tutorial

How to create a MU Online server (complete 2026 guide)

The complete beginner-friendly guide to creating a MU Online private server in 2026: what each component does (SQL Server, MuServer, the game client, the launcher, the website), the recommended technology stack for different seasons, the full step-by-step process from database installation through local testing and going online, network configuration for home servers (port forwarding, No-IP, Hamachi) and VPS servers, security essentials before opening to the public (strong passwords, closed SQL port, anti-hack), choosing the right season for your goals, what to expect in terms of time investment, and the most common first-server mistakes to avoid.

15 min · Advanced
⚙️
Tutorial

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.

12 min · Intermediate