Author Topic: using a PS server compiled from source  (Read 831 times)

virajithj

  • Traveller
  • *
  • Posts: 17
    • View Profile
using a PS server compiled from source
« on: November 09, 2010, 04:26:24 pm »
Hi,

I am trying to use a PS server compiled from source. I was able to run the server but how can i register a user on this server? Do I have to add a user directly to the db? If so how can I do this (I am new to dbs so a bit of detailed info would be really helpful).

Thanks a lot
Virajith

Aiwendil

  • Hydlaa Citizen
  • *
  • Posts: 463
    • View Profile
Re: using a PS server compiled from source
« Reply #1 on: November 09, 2010, 05:47:54 pm »
The SVN-database already comes with a few accounts. So you might want to look into the "src/server/database/mysql/accounts.sql" files to see how they were inserted:

Code: [Select]
...
#
# Dumping data for table accounts
#

#password is "keith"
INSERT INTO `accounts` VALUES (1,'vengeance','8dd9fa632ca161d0ca1929a4d99cbe77','2006-06-24 00:47:50','0000-00-00 00:00:00','127.0.0.1',30,'','US','M',1980,'A',0,0,'none','',0, '', '', '');

#password is "guest"
INSERT INTO `accounts` VALUES (3,'guest','084e0343a0486ff05530df6c705c8bb4','2003-07-22 00:31:36','0000-00-00 00:00:00','127.0.0.1',30,'','US','M',1980,'A',0,0,'none','',0, '', '', '');

#password is "andrew"
INSERT INTO `accounts` VALUES (5,'acraig','d914e3ecf6cc481114a3f534a5faf90b','0000-00-00 00:00:00','0000-00-00 00:00:00','',0,'','US','M',1980,'A',0,0,'none','',0, '', '', '');
...

Maybe it's also worth to have a look at the documentation for the AccountsTable in the wiki for an explanation what the fields in that table do.
Not really sure what is needed for the md5 password....but you can try to create one with "echo <password>|md5sum" in a shell and see if it works.


So, basically it should be something along the lines:
Code: [Select]
mysql -uplaneshift -p
> INSERT INTO `accounts` VALUES (<unique ID>,<name>,<MD5-password>,'0000-00-00 00:00:00',<Acount-creation-data>,'',<GM-Level>,'',<country>,<gender>,<birth-year>,'A',0,0,<additional-comments>,<real-name>,0, '', '', '');


LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: using a PS server compiled from source
« Reply #2 on: November 09, 2010, 06:10:56 pm »
MySQL also supports the MD5() function in INSERT statements; so you can "insert the MD5 sum of your password".

Gag Harmond
Knight and Ambassador
The Royal House of Purrty