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.
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.
BACKUP DATABASE MuOnline TO DISK = 'C:\Backups\MuOnline_before_restore.bak' WITH COMPRESSION, STATS = 10Step 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';
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:
| MapNumber | Map Name | Safe X | Safe Y |
|---|---|---|---|
| 0 | Lorencia | 125 | 125 |
| 1 | Dungeon | 107 | 247 |
| 2 | Devias | 197 | 35 |
| 3 | Noria | 171 | 99 |
| 7 | Atlans | 15 | 15 |
| 10 | Crywolf Fortress | 87 | 90 |
| 56 | Kanturu Relics | 39 | 27 |
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 bytesQuest: 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';
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):
| Class | Class | STR | DEX | VIT | ENE |
|---|---|---|---|---|---|
| Dark Knight | 0 | 28 | 20 | 25 | 10 |
| Dark Wizard | 1 | 18 | 18 | 15 | 30 |
| Fairy Elf | 2 | 22 | 25 | 20 | 15 |
| Magic Gladiator | 3 | 26 | 26 | 26 | 16 |
| Dark Lord | 4 | 26 | 20 | 20 | 15 |
| Summoner | 5 | 18 | 18 | 18 | 23 |
| Rage Fighter | 6 | 32 | 27 | 25 | 10 |
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= 0MapNumberbetween 0 and 255 with a value recognized by the serverMapPosXandMapPosYboth > 0DATALENGTH(Inventory)= 7168 (Season 6)- All stats are positive and within the range 0–65534
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.