delete account

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
n0name12
Posts: 38
Joined: Tue Sep 29, 2009 2:29 pm

delete account

Post by n0name12 »

Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: delete account

Post by denser »

search and you find.
just delete sql entry of player and his account(i mean characters table)
other work made by idfactory.
or as i wrote in some thread...
change owned account of char to yours, set deletion time to 1 and save changes. then login and char or several(thousands?) will be properly deleted.
(key words to search: momo delete characters :lol: )
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
netvirus
Advanced User
Advanced User
Posts: 408
Joined: Sun Aug 02, 2009 3:43 pm
Location: Russia
Contact:

Re: delete account

Post by netvirus »

n0name12 wrote:Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.
select charId, char_name, account_name from characters where char_name LIKE '%nikname%';
delete from items where owner_id = 'write here charId';
delete from character_quests where charId = 'write here charId';
delete from characters where account_name = 'write here char login';
delete from accounts where login = 'write here char login';
FidoNet - iddqd
User avatar
Pere
Posts: 400
Joined: Sat Jan 05, 2008 11:09 am
Location: Catalunya, Berguedà

Re: delete account

Post by Pere »

all this is done on each server startup.. just run

DELETE FROM characters WHERE account_name LIKE "put the sad account here";
DELETE FROM accounts WHERE login LIKE "put the sad account here";
Bones tardes amics meus tots!
User avatar
Szponiasty
Advanced User
Advanced User
Posts: 557
Joined: Mon Apr 21, 2008 1:31 pm
Location: Eastern Poland

Re: delete account

Post by Szponiasty »

netvirus wrote:
n0name12 wrote:Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.
select charId, char_name, account_name from characters where char_name LIKE '%nikname%';
Gz. You just removed all accounts and chars of players:
tommy
Ztommy
tommyPL
tommy666
...
xD

You just need to remove record from "accounts" table. Server will clean all the rest at next reboot.
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
User avatar
netvirus
Advanced User
Advanced User
Posts: 408
Joined: Sun Aug 02, 2009 3:43 pm
Location: Russia
Contact:

Re: delete account

Post by netvirus »

Szponiasty wrote:
netvirus wrote:
n0name12 wrote:Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.
select charId, char_name, account_name from characters where char_name LIKE '%nikname%';
Gz. You just removed all accounts and chars of players:
tommy
Ztommy
tommyPL
tommy666
...
xD

You just need to remove record from "accounts" table. Server will clean all the rest at next reboot.
No. You choose a name which you interests :D
FidoNet - iddqd
n0name12
Posts: 38
Joined: Tue Sep 29, 2009 2:29 pm

Re: delete account

Post by n0name12 »

Affected rows : 0
for like %tommy% ><
should i be happy ?
ps: thanks for the answers.
User avatar
Szponiasty
Advanced User
Advanced User
Posts: 557
Joined: Mon Apr 21, 2008 1:31 pm
Location: Eastern Poland

Re: delete account

Post by Szponiasty »

netvirus wrote: You just need to remove record from "accounts" table. Server will clean all the rest at next reboot.
No. You choose a name which you interests :D[/quote]

Code: Select all

SELECT charId, char_name, account_name FROM characters WHERE char_name LIKE '%PL%'; -- try this ;)
Will select ALL chars that have anywhere in the name "PL" (case insensitive). You get my point now? If you want to delete char with nick "tommy", using LIKE "%tommy%" will delete all chars that have "tommy" anywhere in name. So if you have "tommy666", "tommyPL" - all those chars will be removed. If you do WHERE char_name LIKE '%a%' - now you're removing all chars that have letter 'a' in nickname... Better do WHERE char_name LIKE 'nickname' or just WHERE char_name='nickname'.
And in the next chronicle they went into space, fighting the evil empire... In a galaxy far, far away xD
User avatar
netvirus
Advanced User
Advanced User
Posts: 408
Joined: Sun Aug 02, 2009 3:43 pm
Location: Russia
Contact:

Re: delete account

Post by netvirus »

In that case if you know correctly a name writing which it is necessary to remove :)
We speak about same. I have given an example when some letters from a name are known.
FidoNet - iddqd
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: delete account

Post by jurchiks »

you don't want to delete characters of other players because you don't know the full nickname of the bad guy.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
wonderweiss
Posts: 16
Joined: Mon Aug 02, 2010 9:23 pm

Re: delete account

Post by wonderweiss »

Code: Select all

DELETE FROM character_premium_items WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_friends WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_hennas WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_macroses WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_quests WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_quests_item WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_quests_global_data WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_recipebook WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_recipeshoplist WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_recommends WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_relations WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_shortcuts WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_skills WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_skills_save WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_subclasses WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_raid_points WHERE charId NOT IN (SELECT charId FROM characters); DELETE FROM clan_data WHERE leader_id NOT IN (SELECT charId FROM characters);DELETE FROM clan_privs WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_skills WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_introductions WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_notices WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_wars WHERE clan1 NOT IN (SELECT clan_id FROM clan_data) OR clan2 NOT IN (SELECT clan_id FROM clan_data);UPDATE clan_subpledges SET leader_id = 0 where leader_id NOT IN (SELECT charid from characters);DELETE FROM fortsiege_clans WHERE clan_id NOT IN (SELECT clan_id FROM clan_data); DELETE FROM pets WHERE item_obj_id NOT IN (SELECT object_id FROM items WHERE owner_id IN (SELECT charId FROM characters));DELETE FROM items WHERE owner_id NOT IN (SELECT charId FROM characters) AND owner_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM seven_signs WHERE charId NOT IN (SELECT charId FROM characters);UPDATE characters SET clanid = 0, title = "", clan_privs = 0 where clanid NOT IN (SELECT clan_id FROM clan_data);UPDATE clanhall SET ownerId = 0, paidUntil = 0 where ownerId NOT IN (SELECT clan_id FROM clan_data);DELETE FROM olympiad_nobles WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM olympiad_nobles_eom WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM heroes WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM item_attributes WHERE itemId NOT IN (SELECT object_id FROM items);DELETE FROM siege_clans WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM obj_restrictions WHERE obj_Id NOT IN (SELECT charId FROM characters); DELETE FROM accounts WHERE login NOT IN (SELECT account_name FROM characters);DELETE FROM accounts2 WHERE login NOT IN (SELECT account_name FROM characters);DELETE FROM account_data WHERE account_name NOT IN (SELECT login FROM accounts);
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: delete account

Post by denser »

Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
Post Reply