Jump to content
  • 0

Can't connect to MySQL server


Achhandrian

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   2
  • Joined:  07/31/12
  • Last Seen:  

As the Topics says i got a little problem, installed the server and get this error when trying to start the server.

Trying to start the server:

[root]# ./athena-start start

Athena Starting...

© 2003 Athena Project

modified by [email protected]

checking...

Check complete.

Looks good, a nice Athena!

Now Started Athena.

[root@s15402499 root]# [status]: Memory manager initialised: log/map-server_sql.leaks

rAthena Development Team presents

___ __ __

_____/ | / /_/ /_ ___ ____ ____ _

/ ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/

/ / / ___ / /_/ / / / __/ / / / /_/ /

/_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/

http://rathena.org/board/

[info]: SVN Revision: '16716'.

[Warning]: You are running rAthena with root privileges, it is not necessary.

[status]: Memory manager initialised: log/login-server_sql.leaks

rAthena Development Team presents

___ __ __

_____/ | / /_/ /_ ___ ____ ____ _

/ ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/

/ / / ___ / /_/ / / / __/ / / / /_/ /

/_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/

http://rathena.org/board/

[info]: SVN Revision: '16716'.

[Warning]: You are running rAthena with root privileges, it is not necessary.

[status]: Memory manager initialised: log/char-server_sql.leaks

rAthena Development Team presents

___ __ __

_____/ | / /_/ /_ ___ ____ ____ _

/ ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/

/ / / ___ / /_/ / / / __/ / / / /_/ /

/_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/

http://rathena.org/board/

[info]: SVN Revision: '16716'.

[Warning]: You are running rAthena with root privileges, it is not necessary.

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

[info]: Initializing random number generator.

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

[info]: Console Silent Setting: 0

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

[info]: Reading configuration file conf/login_athena.conf...

[status]: set login_port : 6900

[info]: Console Silent Setting: 0

[info]: Reading configuration file conf/inter_athena.conf...

[info]: Reading configuration file conf/import/inter_conf.txt...

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

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

[info]: Reading configuration file conf/import/login_conf.txt...

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

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

[info]: Reading the configuration file conf/subnet_athena.conf...

[status]: Read information about 1 subnetworks.

[info]: Initializing random number generator.

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

: Can't connect to MySQL server on '127.0.0.1' (111)[/color]

[Debug]: at loginlog_sql.c:110

[info]: Reading configuration file conf/char_athena.conf...

[status]: New_Legends_Ragnarok_Online server has been initialized

[status]: Login server IP address : 127.0.0.1 -> 127.0.0.1

[status]: Character server IP address : 127.0.0.1 -> 127.0.0.1

[info]: Console Silent Setting: 0

[info]: Reading configuration file conf/import/char_conf.txt...

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

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

[info]: Reading the configuration file conf/subnet_athena.conf...

[status]: Read information about 1 subnetworks.

[info]: Reading file conf/inter_athena.conf...

[info]: Reading file conf/import/inter_conf.txt...

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

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

[info]: Finished reading the char-server configuration.

[info]: interserver initialize...

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

[status]: set char_server_ip : 127.0.0.1

[status]: set char_server_port : 3306

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

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

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

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

[color=#ff0000][sql]: Can't connect to MySQL server on '127.0.0.1' (111)[/color]

[Debug]: at inter.c:778

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

[color=#ff0000][sql]: Can't connect to MySQL server on '127.0.0.1' (111)[/color]

inter_athena.conf

// Global SQL settings

// overriden by local settings when the hostname is defined there

// (currently only the login-server reads/obeys these settings)

sql.db_hostname: 127.0.0.1

sql.db_port: 3306

sql.db_username: server1337

sql.db_password: ##########

sql.db_database: server1337

sql.codepage:

// MySQL Character SQL server

char_server_ip: 127.0.0.1

char_server_port: 3306

sql.db_username: server1337

sql.db_password: ##########

sql.db_database: server1337

// MySQL Map SQL Server

map_server_ip: 127.0.0.1

map_server_port: 3306

sql.db_username: server1337

sql.db_password: ##########

sql.db_database: server1337

// MySQL Log SQL Database

log_db_ip: 127.0.0.1

log_db_port: 3306

sql.db_username: server1337

sql.db_password: ##########

sql.db_database: server1337

log_codepage:

log_login_db: loginlog

char.eathena.conf

// Server name, use alternative character such as ASCII 160 for spaces.

// NOTE: Do not use spaces or any of these characters which are not allowed in

// Windows filenames \/:*?"<>|

// ... or else guild emblems won't work client-side!

server_name: New_Legends_Ragnarok_Online

// Wisp name for server: used to send wisp from server to players (between 4 to 23 characters)

wisp_server_name: NL-RO

// Login Server IP

// The character server connects to the login server using this IP address.

// NOTE: This is useful when you are running behind a firewall or are on

// a machine with multiple interfaces.

login_ip: 127.0.0.1

// The character server listens on the interface with this IP address.

// NOTE: This allows you to run multiple servers on multiple interfaces

// while using the same ports for each server.

//bind_ip: 127.0.0.1

// Login Server Port

login_port: 6900

// Character Server IP

// The IP address which clients will use to connect.

// Set this to what your server's public IP address is.

char_ip: 127.0.0.1

// Character Server Port

char_port: 6121

map_eathena.conf

// Interserver communication passwords, set in account.txt (or equiv.)

userid: newlegendro

passwd: geronimo

// Character Server IP

// The map server connects to the character server using this IP address.

// NOTE: This is useful when you are running behind a firewall or are on

// a machine with multiple interfaces.

char_ip: 127.0.0.1

// The map server listens on the interface with this IP address.

// NOTE: This allows you to run multiple servers on multiple interfaces

// while using the same ports for each server.

//bind_ip: 127.0.0.1

// Character Server Port

char_port: 6121

// Map Server IP

// The IP address which clients will use to connect.

// Set this to what your server's public IP address is.

map_ip: 127.0.0.1

// Map Server Port

map_port: 5121

Pics of phpmyadmin mysql db

unbenannt1mv.png

unbenannt2irq.png

I got no problems until this point, both the mysql and the server running on the same virtual server

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  09/01/12
  • Last Seen:  

Had the same error, tried localhost instead of 127.0.0.1 and it worked. Or at least that error was gone. I'm still setting up stuff on my end.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

Hi Achhandrian,

Please try replacing '127.0.0.1' in `inter_athena.conf` with your Dedicated Server/VPS IP. If starting up works, then this would probably mean your MySQL server is being binded to only listen to connections from your Dedicated Server/VPS IP. You can correct this by removing the bind ip setting in '/etc/my.cnf'.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

Either your mysql server is not running or not listening on localhost.

To make it listen, open /etc/mysql/my.conf

search:

bind-address = 127.0.0.1 

and change it to:

#bind-address = 127.0.0.1

To verify, use:

netstat -tap

then, restart the mysql server:

Ubuntu:

sudo service mysql reload

sudo service mysql restart

Edited by Winz
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...