Jump to content
  • 0

No Database Selected - Failed to Connect to Server


gpedro153

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  02/10/15
  • Last Seen:  

so, im new here and trying to create my own server.


 


i followed all the steps of the wiki tutorial and i think i did everything right.


 


MySQL is running and listening on localhost:


 


My_SQL55.png


 


 


 


I have changed inter_athena.conf a little bit and now all of the login-server, char-server, and map-server open and communicate to each other


 


here are the changes I made on my inter_athena.conf:



// MySQL Login server
login_server_ip: 127.0.0.1
login_server_port: 3306
login_server_id: ragnarok
login_server_pw: [ADDED THE PASSWORD I CREATED]
login_server_db: ragnarok
login_codepage:
login_case_sensitive: no

ipban_db_ip: 127.0.0.1
ipban_db_port: 3306
ipban_db_id: ragnarok
ipban_db_pw: [ADDED THE PASSWORD I CREATED]
ipban_db_db: ragnarok
ipban_codepage:

// MySQL Character server
char_server_ip: 127.0.0.1
char_server_port: 3306
char_server_id: ragnarok
char_server_pw: [ADDED THE PASSWORD I CREATED]
char_server_db: ragnarok

// MySQL Map Server
map_server_ip: 127.0.0.1
map_server_port: 3306
map_server_id: ragnarok
map_server_pw: [ADDED THE PASSWORD I CREATED]
map_server_db: ragnarok

// MySQL Log Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok
log_db_pw: [ADDED THE PASSWORD I CREATED]
log: ragnarok
log_codepage:
log_login_db: loginlog 

the tutorial i followed however didn't mentioned to change the lines "login_server_pw:" and "ipban_db_pw:", but before i changed them my login-server couldnt comunicate to MySQL.


 


 


now as i said, all three (login, char, and map-server) communicate to each other.


 


Login2.png


 


Char.pngMap.png


 


However when i try to log in with the game username and password i created in the database it says "Failed to Connect to Server"


 


here is a screenshot of my login-server after i try to login


Login_after.png


 


as you can see it says DB errer - No database selected. 


But it also says "Connection of the account accepted". so it is recognizing my game account, right?


I am assuming this is the problem, but how do i fix it?


Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

On this part you must put the correct infos

// MySQL Login server
login_server_ip: 127.0.0.1
login_server_port: 3306
login_server_id: ragnarok
login_server_pw: [ADDED THE PASSWORD I CREATED]
login_server_db: ragnarok
login_codepage:
login_case_sensitive: no

ipban_db_ip: 127.0.0.1
ipban_db_port: 3306
ipban_db_id: ragnarok
ipban_db_pw: [ADDED THE PASSWORD I CREATED]
ipban_db_db: ragnarok
ipban_codepage:

// MySQL Character server
char_server_ip: 127.0.0.1
char_server_port: 3306
char_server_id: ragnarok
char_server_pw: [ADDED THE PASSWORD I CREATED]
char_server_db: ragnarok

// MySQL Map Server
map_server_ip: 127.0.0.1
map_server_port: 3306
map_server_id: ragnarok
map_server_pw: [ADDED THE PASSWORD I CREATED]
map_server_db: [ CHANGE THIS TO THE TABLE NAME WHERE YOU PUT THE MAIN.SQL DO THE SAME ON THE REST ]

// MySQL Log Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok
log_db_pw: [ADDED THE PASSWORD I CREATED]
log: [ CHANGE THIS TO THE TABLE NAME WHERE YOU PUT THE LOGS.SQL ]
log_codepage:
log_login_db: loginlog 

One more thing did you import the logs.sql in your mysql?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  02/10/15
  • Last Seen:  

yes, i imported the logs.sql into a "Schema" named "log". 

 

mysql.png

// MySQL Log Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok
log_db_pw: [ADDED THE PASSWORD I CREATED]
log: [ CHANGE THIS TO THE TABLE NAME WHERE YOU PUT THE LOGS.SQL ]
log_codepage:
log_login_db: loginlog 

i tried changing the "log:" line to "log: log" to see what happened but the problem is still the same

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

yes, i imported the logs.sql into a "Schema" named "log". 

 

mysql.png

// MySQL Log Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok
log_db_pw: [ADDED THE PASSWORD I CREATED]
log: [ CHANGE THIS TO THE TABLE NAME WHERE YOU PUT THE LOGS.SQL ]
log_codepage:
log_login_db: loginlog 

i tried changing the "log:" line to "log: log" to see what happened but the problem is still the same

 

Weird because as what i can see on the latest inter_athena.conf of rA is this

// MySQL Log Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok
log_db_pw: ragnarok
log_db_db: ragnarok // < The ragnarok must be the same name of your logs table.
log_codepage:
log_login_db: loginlog
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  02/10/15
  • Last Seen:  

log_db_db: ragnarok // < The ragnarok must be the same name of your logs table.

this line didn't exist in my inter_athena.conf, so i added it and now there is no DB error on my login-server.

 

however, when i put my username and password the message still appears "Failed to Connect to Server"

 

funciona.png

 

conecttoserver.png

 

 

and this is a screenshot of login-server after i try to access my account in game.

depois_login.png

 

the last line says

 [Info]: Closed connection from 'my LAN IP'

what could be causing this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

log_db_db: ragnarok // < The ragnarok must be the same name of your logs table.

this line didn't exist in my inter_athena.conf, so i added it and now there is no DB error on my login-server.

 

however, when i put my username and password the message still appears "Failed to Connect to Server"

 

funciona.png

 

conecttoserver.png

 

 

and this is a screenshot of login-server after i try to access my account in game.

depois_login.png

 

the last line says

 [Info]: Closed connection from 'my LAN IP'

what could be causing this?

 

 

Try to replace your LAN IP into localhost 127.0.0.1 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  02/10/15
  • Last Seen:  

i changed the address to 127.0.0.1 in my clientinfo inside my data folder. Now this is what appears after i put my username and password.

 

 

 gravity_error.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

i changed the address to 127.0.0.1 in my clientinfo inside my data folder. Now this is what appears after i put my username and password.

 

 

 gravity_error.png

 

It's not server side issue it your data files issue. 

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...