View Single Post
  #53  
Old 04-05-2009, 09:57 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

That post I made somwhere for converting MiniLogin accounts to the new login system was pretty sucky and complicated. Here's my latest one that works from within MySql and is tested as good.

Code:
--------------------------------------------------------------------------
--- Converts your MiniLogin accounts to the New login acount system.   ---
--- Be sure your 'new_login.login_accounts' is clear before transfer.  ---
--- You can change directory settings to what you prefer.              ---  
--- Linux users need a "world writable" directory (try /tmp ).         ---
--- If you don't like the change, MiniLogin will still work.           --- 
--------------------------------------------------------------------------
SELECT id,name,password FROM ax_classic.account INTO OUTFILE '/eqemu/updates/account_part1.txt'
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

LOAD DATA INFILE '/eqemu/updates/account_part1.txt' INTO TABLE new_login.login_accounts
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n';

UPDATE new_login.login_accounts SET `password` = MD5(`password`) WHERE LENGTH(`password`) > 0 AND (LENGTH(`password`) != 65 AND LOCATE(':', `password`) != 33) AND LENGTH(`password`) != 32;
You can alter the lines/directorys to fit your needs schema new_login is what I named the LS database.
If you had a Public Login account system, then the port will move the names over, but with blank passwords - you'll need to set passwords;
Code:
UPDATE login_accounts SET password=md5("NewPassword") WHERE name = 'UserName';
If you don't like what you did, you don't need to revert - since table account has not been altered, you'll be able to choose whichever LS system you want.

Last edited by Angelox; 04-05-2009 at 06:04 PM..
Reply With Quote