hi im looking foward to clean up my database im writing this post to ask for help ut i will keep googling.
i m looking for a script that will delte all empty accounts
Database cleaning
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- qwerty13
- Posts: 640
- Joined: Mon Feb 02, 2009 9:57 am
- Location: Europe
- Contact:
Re: Database cleaning
Btw, first try it on test server.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";
- janiii
- L2j Veteran
- Posts: 4269
- Joined: Wed May 28, 2008 3:15 pm
- Location: Slovakia
Re: Database cleaning
it depends
- if you have login tables in same database as gameserver tables:
- if they are in separate databases but same machine )l2j_login is the login database name, l2j_game is the gameserver database name):
be sure to make a backup before!
- if you have login tables in same database as gameserver tables:
Code: Select all
DELETE FROM accounts WHERE login NOT IN (SELECT DISTINCT(account_name) FROM characters);
Code: Select all
DELETE FROM l2j_login.accounts WHERE login NOT IN (SELECT DISTINCT(account_name) FROM l2j_game.characters);
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
forum flOOder dancing dEVILoper ♀
I don't give private support - PM will be ignored!
- gmakhs
- Posts: 215
- Joined: Sat Apr 14, 2007 12:00 pm
Re: Database cleaning
thanks im gonna try it tommorow anbd ofc i will do backup first!