Jump to content
  • 0

Installing rAthena with External MySQL Database


Talaysen

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  161
  • Reputation:   5
  • Joined:  02/07/13
  • Last Seen:  

Hello all,

I've been trying to set this up for most of today and have just been.. struggling with it.

I've tried searching extensively for related guides or posts, but can't seem to find anything.

Are there any guides that exist for setting up with an external MySQL database?

In my particular situation, I'm using CentOS 06. My MySQL Database is with the same host, it's on the same local network, but not on the local machine.

Following the guide at:

http://rathena.org/w...lation_(CentOS)

I've installed the prerequisites, excluding the mysql-server (didn't feel it was necessary?).

I created a separate user account for my rAthena installation to run on.

I did the SVN checkout: 'svn checkout https://rathena.svn..../rathena/trunk/ ~/trunk'

I'm pretty much lost at this point.

How do I go about creating the MySQL Database/necessary tables for RO?

For editing inter_athena.conf,

My host did mention that I should use the interal address for connecting to the database (so I don't have to pay for bandwith usage), I would put that address and the other relevant connection details into inter_athena.conf, correct?

Are there any other files I need to edit? /wah

Edited by Talaysen
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • -1

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  02/02/13
  • Last Seen:  

hey, i have same problem ,

i have 2 VPS (1 centos with cpanel, and 1 windows )

i want to remote mysql database so my windows can connect to my cpanel

but i cant connect it, if i used only windows and mysql it can connect

when i want to remote it i can't connect it

i change iter_athena to my cPanel for my database

change my map, char, to my cPanel IP, and try to with my windows ip

but still cant connect , someone can help me?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

With your MySQL Server on a different host, you just have to edit trunk/conf/inter_athena.conf and change all the IP settings from 127.0.0.1 to the LAN IP of your MySQL Server (that your host told you).

The rest of your setup should be just like Installation_(CentOS).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  161
  • Reputation:   5
  • Joined:  02/07/13
  • Last Seen:  

How do I go about getting the MySQL table information into the database?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

When you're logged into SSH, type this command to connect to your MySQL server:

mysql --host=1.1.1.1 --user=USERNAME -p

(replace 1.1.1.1 with the IP of your MySQL Server, and replace USERNAME with your MySQL Username, provided by your host)

2. then create the MySQL databases: Installation_(CentOS)#Create_SQL_database_for_rAthena

(your host might have already created databases for you)

3. then, after you've checked out rAthena, follow these steps to import the SQL files Installation_(CentOS)#Import_MySQL_Tables (but make sure you add the -h 1.1.1.1 option)

cd trunk/sql-files/

mysql --host=1.1.1.1 --user=USER -p rathena4444_rag < main.sql
mysql --host=1.1.1.1 --user=USER -p rathena4444_rag < item_db.sql
mysql --host=1.1.1.1 --user=USER -p rathena4444_rag < item_db2.sql
mysql --host=1.1.1.1 --user=USER -p rathena4444_rag < mob_db.sql
mysql --host=1.1.1.1 --user=USER -p rathena4444_rag < mob_db2.sql
mysql --host=1.1.1.1 --user=USER -p rathena4444_log < logs.sql

(replace rathena4444_*** with the database name(s) your host provided for you, or you created in step 2)

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  161
  • Reputation:   5
  • Joined:  02/07/13
  • Last Seen:  

That worked wonderfully!

However, I recompiled the server, and I've hit a new issue:

[info]: SVN Revision: '17122'.

[info]: SVN Revision: '17122'.

[info]: Server supports up to '1024' concurrent connections.

[info]: Server supports up to '1024' concurrent connections.

[info]: Finished reading conf/import/inter_conf.txt.

[info]: Finished reading conf/inter_athena.conf.

[info]: Finished reading conf/import/login_conf.txt.

[info]: Finished reading conf/login_athena.conf.

[info]: Done reading conf/import/char_conf.txt.

[info]: Done reading conf/char_athena.conf.

[info]: Done reading conf/import/inter_conf.txt.

[info]: Done reading conf/inter_athena.conf.

[info]: Done reading conf/import/inter_conf.txt.

[info]: Done reading conf/inter_athena.conf.

[info]: Connect Character DB server.... (Character Server)

[Warning]: Not all IP addresses in map_athena.conf configured, autodetecting...

[Notice]: Multiple interfaces detected...

[info]: Defaulting to 209.141.33.150 as our IP address

[info]: Map Server IP Address : '209.141.33.150' -> '209.141.33.150'.

[info]: Char Server IP Address : '209.141.33.150' -> '209.141.33.150'.

[status]: Done reading '49' entries in 'db/re/exp_guild.txt'.

[status]: Using SQL dbs: no

[info]: Logging item transactions to table 'picklog'.

[info]: Logging commands to table 'atcommandlog'.

[info]: Connecting to the Map DB Server....

[status]: Finished Reading GeoIP Database.

[status]: Characters per Account: '9'.

[Error]: make_listen_bind: bind failed (socket #6, error 98: Address already in use)!

[status]: connect success! (Map Server Connection)

[info]:

: Connecting to the Log Database nymphro1_ragnarok At 172.16.0.51...

[status]: [sql]: Successfully 'connected' to Database 'nymphro1_ragnarok'.

[status]: Multiple interfaces detected.. using 209.141.33.150 as our IP address

[status]: Loading maps (using db/re/map_cache.dat as map cache)...

[Error]: make_listen_bind: bind failed (socket #4, error 98: Address already in use)!

[info]: Successfully loaded '804' maps.

[status]: Done reading '60' command aliases in 'conf/atcommand_athena.conf'.

[status]: Done reading packet database from 'packet_db.txt'. Using default packet version: 32.

[Error]: make_listen_bind: bind failed (socket #5, error 98: Address already in use)!

[rathena7741@NymphRO trunk]$

Although it failed, I'm fairly pleased that it is utilizing the internal IP for the SQL database like it's supposed to.

Though, any idea what's wrong?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

[status]: Multiple interfaces detected.. using 209.141.33.150 as our IP address

Did your host also tell you an IP address to use for your login/char/map servers?

You have to manually set these:

- trunk/conf/login_athena.conf (bind_ip)

- trunk/conf/char_athena.conf (login_ip, bind_ip, char_ip)

- trunk/conf/map_athena.conf (char_ip, bind_ip, map_ip)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  161
  • Reputation:   5
  • Joined:  02/07/13
  • Last Seen:  

They didn't say, the few questions I've gotten answered were from helpful folks on IRC.

It's an unmanaged service, so there's no direct customer support.

I suppose the server IP would be used for each of those?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  161
  • Reputation:   5
  • Joined:  02/07/13
  • Last Seen:  

[status]: Multiple interfaces detected.. using 209.141.33.150 as our IP address

Did your host also tell you an IP address to use for your login/char/map servers?

You have to manually set these:

- trunk/conf/login_athena.conf (bind_ip)

- trunk/conf/char_athena.conf (login_ip, bind_ip, char_ip)

- trunk/conf/map_athena.conf (char_ip, bind_ip, map_ip)

Should I use the external IP address, or the internal (lan) server address?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Set them all to your external WAN IP.

If that doesn't work, then leave bind_ip commented out and set

the red ones to your internal LAN IP and set the green ones to your WAN IP.

[status]: Multiple interfaces detected.. using 209.141.33.150 as our IP address

Did your host also tell you an IP address to use for your login/char/map servers?

You have to manually set these:

- trunk/conf/login_athena.conf (bind_ip)

- trunk/conf/char_athena.conf (login_ip, bind_ip, char_ip)

- trunk/conf/map_athena.conf (char_ip, bind_ip, map_ip)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  161
  • Reputation:   5
  • Joined:  02/07/13
  • Last Seen:  

Testing now with bind_ip commented out, with other recommended settings, getting:

([status]: Login server IP address : 172.16.235.216 -> 172.16.235.216

[status]: Character server IP address : 209.141.33.150 -> 209.141.33.150)

[status]: Attempting to connect to Char Server. Please wait.

[status]: Connecting to 172.16.235.216:6121

[Error]: make_connection: connect failed (socket #5, error 113: No route to host)!

[Error]: make_connection: connect failed (socket #6, error 113: No route to host)!

[Error]: make_connection: connect failed (socket #5, error 113: No route to host)!

[status]: Connecting to 172.16.235.216:6121

[Error]: make_connection: connect failed (socket #6, error 113: No route to host)!

[info]: Attempt to connect to login-server...

[status]: Connecting to 172.16.235.216:6900

[Error]: make_connection: connect failed (socket #5, error 113: No route to host)!

[status]: Connecting to 172.16.235.216:6121

[Error]: make_connection: connect failed (socket #6, error 113: No route to host)!

[info]: Attempt to connect to login-server...

[status]: Connecting to 172.16.235.216:6900

Edit:

I don't know if this is relevant at all, but the service does have some sort of DDoS filtering/protection in place, not sure if that changes/affects anything.

Edited by Talaysen
Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...