Jump to content

Question

Good afternoon friends, I need to configure the login table and loginlog in a different database, for example:

Myserver_login: login, loginlo
Myserver_1: char, storage ..... etc
Myserver_2: char, storage ..... etc

I did this with rAthena using the "inter_athena.conf"
// MySQL Login server
Login_server_ip: 127.0.0.1
Login_server_port: 3306
Login_server_id: ***
Login_server_pw: ***
Login_server_db: ***

// MySQL Character server
Char_server_ip: 127.0.0.1
Char_server_port: 3306
Char_server_id: ***
Char_server_pw: ***
Char_server_db: ***

Etc ... I can do the same in Hercules? Thank you : )

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 1

I suggest using import folder:

conf/import/char-server.conf:

char_configuration: {
	sql_connection: {
		db_hostname: "127.0.0.1"
		db_port: 3306
		db_username: "username"
		db_password: "password"
		db_database: "database"
	}
}

^ equivalent to Char_server_ip/char_server_port/etc.. in rA

conf/import/login-server.conf:

login_configuration: {
	account: {
		sql_connection: { // equivalent to login_server_ip/login_server_port/etc.
			db_hostname: "127.0.0.1"
			db_port: 3306
			db_username: "username"
			db_password: "password"
			db_database: "database"
		}
		ipban: {
			sql_connection: { // equivalent to ipban_db_ip/ipban_db_port/etc.
				db_hostname: "127.0.0.1"
				db_port: 3306
				db_username: "username"
				db_password: "password"
				db_database: "database"
			}
		}
	}
}

conf/import/inter-server.conf:

 

inter_configuration: {
	log: {
		sql_connection: { // equivalent to log_db_ip/log_db_port/etc.
			db_hostname: "127.0.0.1"
			db_port: 3306
			db_username: "username"
			db_password: "password"
			db_database: "database"
		}
	}
}

conf/import/map-server.conf

map_configuration: {
	sql_connection: { //equivalent to map_server_ip/map_server_port/etc.
		db_hostname: "127.0.0.1"
		db_port: 3306
		db_username: "username"
		db_password: "password"
		db_database: "database"
	}
}

 

 

If you want all servers to use same db username/pass/database, you can instead edit conf/global/sql_connection.conf

sql_connection: {
	db_hostname: "127.0.0.1"
	db_port: 3306
	db_username: "ragnarok"
	db_password: "ragnarok"
	db_database: "ragnarok"
	//codepage:""
}

sql_connection.conf affects all server, and avoids mentioning each credentials seperately.

 

I hope it helped you and this is what you were asking for.

Share this post


Link to post
Share on other sites
  • 0
8 minutes ago, meko said:

Yes, I have already looked, but I do not know how to do so that only the login is done on another server.

Database_names: {
Account_db: "login"
Login_db: "loginlog"

These need to connect to a different database from the other tables.

Because? I want to migrate my accounts from rAthena to start using Hercules, but in rAthena I used 1 account for all the servers, you know?

Share this post


Link to post
Share on other sites
  • 0

rAthena tables are not compatible with Hercules table

If what you meant is running a rAthena login server with a Hercules char + map servers that isn't compatible either

 

If you want to migrate data you will have to export to a .sql file, change the structure to match Hercules's then import in the Herc db

Share this post


Link to post
Share on other sites
  • 0
Just now, meko said:

rAthena tables are not compatible with Hercules table

Only the accounts, the rest will not be migrated, and let's say I start the servers from scratch, I get all the servers log in the same database, but load the characters and all other rest?

To facilitate what I need to do ....

Server 1
Login: 172.21.0.1
Char, map, etc: 192.168.0.1

Server 2
Login: 172.21.0.1
Char, map, etc: 201.168.0.1

Is that what I need to do at Hercules too, with you? And thanks for your support so far ^^

Share this post


Link to post
Share on other sites
  • 0

Are you talking about having 2 set of server? Or using multiple database for login/char/map?

From the first post , it seems you were talking about database, but from last post, it seems you want multi map server, however, multi map server is not possible with Hercules..

If you were asking of database, it's possible to segregate the database for login/char/map server, use import folders and import your own sql_connection setting(the format is same as that of map-server.conf/char-server.conf/login-server.conf)

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, Dastgir said:

Are you talking about having 2 set of server? Or using multiple database for login/char/map?

From the first post , it seems you were talking about database, but from last post, it seems you want multi map server, however, multi map server is not possible with Hercules..

If you were asking of database, it's possible to segregate the database for login/char/map server, use import folders and import your own sql_connection setting(the format is same as that of map-server.conf/char-server.conf/login-server.conf)

Exactly, I need all servers to use the same database for login, just login.

Char / map each server will have your.

By doing this, I create only one account, and I use it for all servers, just like I already do on rAthena, and the same is done on the official one.

 

Share this post


Link to post
Share on other sites
  • 0

Thanks for the help @Dastgir, it worked for the login, but the error in the ma-server when connecting in char-server.

map-server

Spoiler
[Info]: Hercules 32-bit for Windows
[Info]: Exported revision (src): 'Unknown'
[Info]: Exported revision (scripts): 'Unknown'
[Info]: OS version: 'Windows 8 Professional (build 9200) [x86_64]'
[Info]: CPU: 'x86_64 CPU, Family 6, Model 58, Stepping 9 [4]'
[Info]: Compiled with Microsoft Visual C++ 2015 (v1910)
[Info]: Compile Flags: N/A
[Info]: Timer Function Type: ticks count
[Info]: Server uses 'select' as event dispatcher
[Info]: Server supports up to '4096' concurrent connections.
[Info]: Char Server IP Address : '127.0.0.1' -> '127.0.0.1'.
[Info]: Map Server IP Address : '127.0.0.1' -> '127.0.0.1'.
[Warning]: Using the default user/password s1/p1 is NOT RECOMMENDED.
[Notice]: Please edit your 'login' table to create a proper inter-server user/password (gender 'S')
[Notice]: and then edit your user/password in conf/map-server.conf (or conf/import/map_conf.txt)
[Info]: Logging item transactions to table 'picklog'.
[Info]: Logging chat to table 'chatlog'.
[Info]: Logging commands to table 'atcommandlog'.
[Info]: Logging item transactions to table 'picklog'.
[Info]: Logging chat to table 'chatlog'.
[Info]: Logging commands to table 'atcommandlog'.
[Info]: Connecting to the Map DB Server....
[Status]: connect success! (Map Server Connection)
[Info]:
: Connecting to the Log Database teste_rag_sv01 At 127.0.0.1...
[Status]: [SQL]: Successfully 'connected' to Database 'teste_rag_sv01'.
[Status]: Loading maps (using db/re/map_cache.dat as map cache)...
[Notice]: Removing map [ pvp_y_1-5 ] from maplist
[Notice]: Removing map [ pvp_y_2-5 ] from maplist
[Notice]: Removing map [ pvp_y_3-5 ] from maplist
[Notice]: Removing map [ pvp_y_4-5 ] from maplist
[Notice]: Removing map [ pvp_y_5-5 ] from maplist
[Notice]: Removing map [ pvp_y_6-5 ] from maplist
[Notice]: Removing map [ pvp_y_7-5 ] from maplist
[Notice]: Removing map [ pvp_y_8-5 ] from maplist
[Info]: Successfully loaded '872' maps.
[Notice]: Maps removed: '8'
[Status]: Done reading '62' command aliases in 'conf/atcommand.conf'.
[Status]: Done reading '4' channels in 'conf/channels.conf'.
[Status]: Done reading '10058' entries in 're/item_db.conf'.
[Status]: Done reading '0' entries in 'item_db2.conf'.
[Status]: Done reading '415' entries in 'item_combo_db'.
[Status]: Done reading '57' entries in 'db/re/item_group.conf'.
[Status]: Done reading '4' entries in 'db/re/item_chain.conf'.
[Status]: Done reading '270' entries in 'db/re/item_packages.conf' (C).
[Status]: Done reading '186' entries in 'db/item_options.conf'.
[Status]: Done reading '16' entries in 'db/cashshop_db.conf'.
[Status]: Done reading '1124' entries in 'db/re/skill_db.conf'.
[Status]: Done reading '264' entries in 'db/produce_db.txt'.
[Status]: Done reading '136' entries in 'db/create_arrow_db.txt'.
[Status]: Done reading '205' entries in 'db/abra_db.txt'.
[Status]: Done reading '17' entries in 'db/spellbook_db.txt'.
[Status]: Done reading '23' entries in 'db/magicmushroom_db.txt'.
[Status]: Done reading '133' entries in 'db/skill_reproduce_db.txt'.
[Status]: Done reading '16' entries in 'db/skill_improvise_db.txt'.
[Status]: Done reading '74' entries in 'db/skill_changematerial_db.txt'.
[Status]: Done reading '14' zones in 'db/re/map_zone_db.conf'.
[Status]: Done reading '0' entries in 'db/mob_item_ratio.txt'.
[Status]: Done reading '40' entries in 'mob_chat_db.txt'.
[Status]: Done reading '1716' entries in 're/mob_db.conf'.
[Status]: Done reading '0' entries in 'mob_db2.conf'.
[Status]: Done reading '10021' entries in 'db/re/mob_skill_db.txt'.
[Status]: Done reading '0' entries in 'db/mob_skill_db2.txt'.
[Status]: Done reading '0' entries in 'db/mob_avail.txt'.
[Status]: Done reading '480' entries in 're/mob_branch.txt'.
[Status]: Done reading '14' entries in 're/mob_poring.txt'.
[Status]: Done reading '47' entries in 're/mob_boss.txt'.
[Status]: Done reading '331' entries in 'mob_pouch.txt'.
[Status]: Done reading '25' entries in 'mob_classchange.txt'.
[Status]: Done reading '8' entries in 'db/re/mob_race2_db.txt'.
[Status]: Done reading '17' entries in 'db/re/exp.txt'.
[Status]: Done reading '35' entries in 'db/re/level_penalty.txt'.
[Status]: Done reading '4' entries in 'db/re/attr_fix.txt'.
[Status]: Done reading '175' entries in 'db/re/statpoint.txt'.
[Status]: Done reading '7' groups in 'conf/groups.conf'.
[Status]: Done reading '134' entries in 'db/job_db2.txt'.
[Status]: Done reading '3' entries in 'db/re/size_fix.txt'.
[Status]: Done reading '5' entries in 're/refine_db.conf'.
[Status]: Done reading '392' entries in 'db/sc_config.txt'.
[Status]: Done reading '116' entries in 'db/re/job_db.conf'.
[Status]: Done reading '34' entries in 'db/castle_db.txt'.
[Status]: Done reading '15' entries in 'db/guild_skill_tree.txt'.
[Status]: Done reading '63' pets in 're/pet_db.txt'.
[Status]: Done reading '0' pets in 'pet_db2.txt'.
[Status]: Done reading '13' entries in 'db/re/homunculus_db.txt'.
[Status]: Done reading '150' levels in 're/exp_homun.txt'.
[Status]: Done reading '82' entries in 'db/homun_skill_tree.txt'.
[Status]: Done reading '61' entries in 'db/mercenary_db.txt'.
[Status]: Done reading '157' entries in 'db/mercenary_skill_db.txt'.
[Status]: Done reading '12' elementals in 'db/elemental_db.txt'.
[Status]: Done reading '36' entries in 'db/elemental_skill_db.txt'.
[Status]: Done reading '3044' entries in 'quest_db.conf'.
[Info]: Done loading '16331' NPCs:
        -'3476' Warps
        -'2' Shops
        -'12853' Scripts
        -'3381' Spawn sets
        -'49266' Mobs Cached
        -'0' Mobs Not Cached
[Status]: Event 'OnInit' executed with '2185' NPCs.
[Info]: Hercules, Copyright (C) 2012-2016, Hercules Dev Team and others.
[Info]: Licensed under the GNU General Public License, version 3 or later.
[Status]: Server is 'ready' and listening on port '5121'.
[Status]: Attempting to connect to Char Server. Please wait.
[Status]: Connecting to 127.0.0.1:6121
[Status]: Logging in to char server...
[Fatal Error]: Connection to char-server failed 3.
Map-Server has terminated abnormally.
Restarting in 15 seconds, press Ctrl+C to cancel.

login-server

Spoiler
[Info]: Hercules 32-bit for Windows
[Info]: Exported revision (src): 'Unknown'
[Info]: Exported revision (scripts): 'Unknown'
[Info]: OS version: 'Windows 8 Professional (build 9200) [x86_64]'
[Info]: CPU: 'x86_64 CPU, Family 6, Model 58, Stepping 9 [4]'
[Info]: Compiled with Microsoft Visual C++ 2015 (v1910)
[Info]: Compile Flags: N/A
[Info]: Timer Function Type: ticks count
[Info]: Server uses 'select' as event dispatcher
[Info]: Server supports up to '4096' concurrent connections.
[Info]: Finished reading conf/login/login-server.conf.
[Status]: Read information about 1 LAN subnets.
[Status]: Read information about 1 trusted IP ranges.
[Status]: Read information about 2 allowed server IP ranges.
[Warning]: Using a wildcard IP range in the allowed server IPs is NOT RECOMMENDED.
[Notice]: Please edit your 'conf/network.conf' allowed list to fit your network configuration.
[Info]: Hercules, Copyright (C) 2012-2016, Hercules Dev Team and others.
[Info]: Licensed under the GNU General Public License, version 3 or later.
[Status]: The login-server is ready (Server is listening on the port 6900).
[Info]: Connection request of the char-server 'Hercules' @ 127.0.0.1:6121 (account: 'teste@login', pass: 'teste', ip: '127.0.0.1')
[Notice]: Authentication accepted (account: teste@login, id: 1, ip: 127.0.0.1)
[Status]: Connection of the char-server 'Hercules' accepted.

char-server

Spoiler
[Info]: Hercules 32-bit for Windows
[Info]: Exported revision (src): 'Unknown'
[Info]: Exported revision (scripts): 'Unknown'
[Info]: OS version: 'Windows 8 Professional (build 9200) [x86_64]'
[Info]: CPU: 'x86_64 CPU, Family 6, Model 58, Stepping 9 [4]'
[Info]: Compiled with Microsoft Visual C++ 2015 (v1910)
[Info]: Compile Flags: N/A
[Info]: Timer Function Type: ticks count
[Info]: Server uses 'select' as event dispatcher
[Info]: Server supports up to '4096' concurrent connections.
[Info]: server name Hercules
[Status]: Login server IP address : 0.0.0.0 -> 127.0.0.1
[Status]: Character server IP address : 0.0.0.0 -> 127.0.0.1
[Info]: Done reading conf/char/char-server.conf.
[Info]: Done reading conf/import/char-server.conf.
[Status]: Read information about 1 LAN subnets.
[Status]: Read information about 1 trusted IP ranges.
[Status]: Read information about 2 allowed server IP ranges.
[Warning]: Using a wildcard IP range in the allowed server IPs is NOT RECOMMENDED.
[Notice]: Please edit your 'conf/network.conf' allowed list to fit your network configuration.
[Info]: Done reading conf/common/inter-server.conf.
[Info]: Done reading conf/common/inter-server.conf.
[Info]: Done reading conf/import/inter-server.conf.
[Info]: Connect Character DB server.... (Character Server)
[Status]: Done reading '50' entries in 'db/re/exp_guild.txt'.
[Status]: Finished Reading GeoIP Database.
[Info]: Hercules, Copyright (C) 2012-2016, Hercules Dev Team and others.
[Info]: Licensed under the GNU General Public License, version 3 or later.
[Status]: The char-server is ready (Server is listening on the port 6121).
[Info]: Attempt to connect to login-server...
[Status]: Connecting to 127.0.0.1:6900
[Status]: Connected to login-server (connection #2).
[Status]: Awaiting maps from map-server.

Any idea what I did wrong?

Share this post


Link to post
Share on other sites
  • 0

Sorry for the friends error, I found that using userid and passwd in the same map-server.confi file in char-server.conf works.

I had disabled them, thinking it was communicating with the database.

map-server.conf

inter: {
  // Interserver communication passwords, set in the login server database
  userid: "user"
  passwd: "pass"

char-server.conf

inter: {
  // Server Communication username and password.
  userid: "user"
  passwd: "pass"

Thanks again @Dastgir, your response worked perfectly as desired!

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.