Перейти к содержанию

Подключение сервера к БД


Рекомендуемые сообщения

Всем привет!! Пытаюсь подключить сервер к базе данных но у меня это не получается по каким то причинам. На сколько я знаю это делается в inter_athena.conf Но ничего не выходит(( Посмотрите может кто то подскажет так ли я делаю это?


sql.db_hostname: 127.0.0.1
sql.db_port: 6900
sql.db_username: тут нужно имя пользователя?
sql.db_password: пароль от базы соответственно
sql.db_database: и имя базы
sql.codepage:
// MySQL Character SQL server
char_server_ip: 127.0.0.1
char_server_port: 6900
char_server_id: тут нужно имя пользователя?
char_server_pw: пароль от базы соответственно
char_server_db: и имя базы
// MySQL Map SQL Server
map_server_ip: 127.0.0.1
map_server_port: 6900
map_server_id: тут нужно имя пользователя?
map_server_pw: пароль от базы соответственно
map_server_db: и имя базы
// MySQL Log SQL Database
log_db_ip: 127.0.0.1
log_db_port: 6900
log_db_id: тут нужно имя пользователя?
log_db_pw: пароль от базы соответственно
log_db_db: и имя базы
log_codepage:

Просто после данной операции при запуске у меня выдает такое


[SQL]: Can't connect to MySQL server on '127.0.0.1' (111)
[Debug]: at inter.c:282
[SQL]: Can't connect to MySQL server on '127.0.0.1' (111)
[Debug]: at loginlog_sql.c:111
[Warning]: SECURITY 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_athena.conf (or conf/import/map_conf.txt)
[Warning]: CONFIGURATION WARNING - Not all IP addresses in map_athena.conf are configured, autodetecting... (can pick the wrong ip address)
[Notice]: Multiple interfaces detected...
[Info]: Defaulting to 127.0.0.2 as our IP address
[Info]: Map Server IP Address : '127.0.0.2' -> '127.0.0.2'.
[Info]: Char Server IP Address : '127.0.0.2' -> '127.0.0.2'.
[Warning]: Unknown setting 'extended_vending' in file conf/battle/items.conf
[Warning]: Unknown setting 'item_zeny' in file conf/battle/items.conf
[Warning]: Unknown setting 'item_cash' in file conf/battle/items.conf
[Status]: Using SQL dbs: no
[Info]: Logging item transactions to file 'log/picklog.log'.
[Info]: Logging monster summon item usage to file 'log/picklog.log'.
[Info]: Logging chat to file 'log/chatlog.log'.
[Info]: Logging gm commands to file 'log/atcommandlog.log'.
[Info]: Logging MVP monster rewards to file 'log/mvplog.log'.
[Info]: Logging Zeny transactions to file 'log/zenylog.log'.
[Info]: Connecting to the Map DB Server....
[SQL]: Can't connect to MySQL server on '127.0.0.1' (111)


Подскажите пожалуйста что я делаю не так? Сервер стоит на хостинге.

Изменено пользователем Hellion35
Ссылка на комментарий
Поделиться на другие сайты

нет, у меня сервер поставлен на хостинг, хостера уже 2 дня не могу достучаться((( Пытаюсь сам настроить дабы не простаивал так просто. Clown Подскажи пожалуйста где копать?

База залита да


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

Тут раскоментировать нужно? или что то еще?

Изменено пользователем Hellion35
Ссылка на комментарий
Поделиться на другие сайты

Подскажите, а в inter_athena


sql.db_hostname: 127.0.0.1
sql.db_port: 3306
sql.db_username: Логин базы
sql.db_password: Пароль
sql.db_database: Имя базы
sql.codepage:

Это понятно. Просто не понятно тут что?


// MySQL Character SQL server
char_server_ip: 127.0.0.1
char_server_port: 3306
char_server_id: Что это за ID? сюда тоже логин дб вписывать?
char_server_pw: Пароль базы
char_server_db: Имя базы

Так да? Просто не понятно что значит char_server_id

Может гайд где то есть? просто искал, так и не смог найти((( Ткните пожалуйста если кто знает.

Изменено пользователем Hellion35
Ссылка на комментарий
Поделиться на другие сайты

Где ты вообще выкопал это?

// MySQL Character SQL server

char_server_ip: 127.0.0.1

char_server_port: 3306

char_server_id: Что это за ID? сюда тоже логин дб вписывать?

char_server_pw: Пароль базы

char_server_db: Имя базы

В inter_athena должно быть так:

// Athena InterServer configuration.

// Contains settings shared/used by more than 1 server.

// Options for both versions

// Log Inter Connections, etc.?

log_inter: 1

// Inter Log Filename

inter_log_filename: log/inter.log

// Level range for sharing within a party

party_share_level: 15

// You can specify the codepage to use in your MySQL tables here.

// (Note that this feature requires MySQL 4.1+)

//default_codepage:

// For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1

// Under windows, you want to use 127.0.0.1. If you see a message like

// "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

// and you have localhost, switch it to 127.0.0.1

// Global SQL settings

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

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

// MySQL Login server

login_server_ip: 127.0.0.1

login_server_port: 3306

login_server_id: ragnarok

login_server_pw: ragnarok

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: ragnarok

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: ragnarok

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: ragnarok

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: ragnarok

log_db_db: ragnarok

log_codepage:

log_login_db: loginlog

// MySQL Reconnect Settings

// - mysql_reconnect_type:

// 1: When MySQL disconnects during runtime, the server tries to reconnect

// mysql_reconnect_count times and shuts down if unsuccessful.

// 2: When mysql disconnects during runtime, it tries to reconnect indefinitely.

mysql_reconnect_type: 2

mysql_reconnect_count: 1

// DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL

// this is meant for people who KNOW their stuff, and for some reason want to change their

// database layout. [CLOWNISIUS]

// ALL MySQL Database Table names

// Login Database Tables

login_server_account_db: login

login_server_accreg_db: global_reg_value

ipban_table: ipbanlist

// Char Database Tables

char_db: char

hotkey_db: hotkey

scdata_db: sc_data

cart_db: cart_inventory

inventory_db: inventory

charlog_db: charlog

storage_db: storage

reg_db: global_reg_value

skill_db: skill

interlog_db: interlog

memo_db: memo

guild_db: guild

guild_alliance_db: guild_alliance

guild_castle_db: guild_castle

guild_expulsion_db: guild_expulsion

guild_member_db: guild_member

guild_skill_db: guild_skill

guild_position_db: guild_position

guild_storage_db: guild_storage

party_db: party

pet_db: pet

friend_db: friends

mail_db: mail

auction_db: auction

quest_db: quest

homunculus_db: homunculus

skill_homunculus_db: skill_homunculus

mercenary_db: mercenary

mercenary_owner_db: mercenary_owner

elemental_db: elemental

ragsrvinfo_db: ragsrvinfo

skillcooldown_db: skillcooldown

bonus_script_db: bonus_script

// Map Database Tables

buyingstore_db: buyingstores

buyingstore_items_db: buyingstore_items

item_db_db: item_db

item_db_re_db: item_db_re

item_db2_db: item_db2

//item_db2_db: item_db2_re

item_cash_db_db: item_cash_db

item_cash_db2_db: item_cash_db2

mob_db_db: mob_db

mob_db_re_db: mob_db_re

mob_db2_db: mob_db2

//mob_db2_db: mob_db2_re

mob_skill_db_db: mob_skill_db

mob_skill_db_re_db: mob_skill_db_re

mob_skill_db2_db: mob_skill_db2

//mob_skill_db2_db: mob_skill_db2_re

mapreg_db: mapreg

vending_db: vendings

vending_items_db: vending_items

// Use SQL item_db, mob_db and mob_skill_db for the map server? (yes/no)

use_sql_db: no

import: conf/import/inter_conf.txt

Изменено пользователем Clown
Ссылка на комментарий
Поделиться на другие сайты

Бляха что за....У меня вот такой inter_athena


// Athena InterServer configuration.
// Options for both versions
// Log Inter Connections, etc.?
log_inter: 1
// Inter Log Filename
inter_log_filename: log/inter.log
// Level range for sharing within a party
party_share_level: 10

// TXT version options only
// Storage flatfile database, used for Karfa storage.
storage_txt: save/storage.txt
// Party flatfile database, for party names, members and other party info.
party_txt: save/party.txt
// Hotkeys flatfile database, where character skill shortcuts are stored.
hotkeys_txt: save/hotkeys.txt
// Guild flatfile database, for guild names, members, and other guild info.
guild_txt: save/guild.txt
// Pet flatfile database, for pet names, and other pet info.
pet_txt: save/pet.txt
// Homunculus flatfile database, for homunculus information.
homun_txt: save/homun.txt
// Castle flatfile database, for emperium war castles, etc.
castle_txt: save/castle.txt
// Status change flatfile database, for status changes that are saved between sessions.
scdata_txt: save/scdata.txt
// Mapserver permanent script variables ($-type)
mapreg_txt: save/mapreg.txt

// SQL version options only
// You can specify the codepage to use in your mySQL tables here.
// (Note that this feature requires MySQL 4.1+)
//default_codepage:

// For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1
// Under windows, you want to use 127.0.0.1. If you see a message like
// "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
// and you have localhost, switch it to 127.0.0.1
// 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: ragnarok
sql.db_password: ragnarok
sql.db_database: ragnarok
sql.codepage:
// MySQL Character SQL server
char_server_ip: 127.0.0.1
char_server_port: 3306
char_server_id: ragnarok
char_server_pw: ragnarok
char_server_db: ragnarok
// MySQL Map SQL Server
map_server_ip: 127.0.0.1
map_server_port: 3306
map_server_id: ragnarok
map_server_pw: ragnarok
map_server_db: ragnarok
// MySQL Log SQL Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok
log_db_pw: ragnarok
log_db_db: ragnarok
log_codepage:
// DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL
// this is meant for people who KNOW their stuff, and for some reason want to change their
// database layout. [CLOWNISIUS]
// ALL MySQL Database Table names
// Login Database Tables
loginlog_db: loginlog
// Char Database Tables
char_db: char
hotkey_db: hotkey
scdata_db: sc_data
cart_db: cart_inventory
inventory_db: inventory
charlog_db: charlog
storage_db: storage
reg_db: global_reg_value
skill_db: skill
interlog_db: interlog
memo_db: memo
guild_db: guild
guild_alliance_db: guild_alliance
guild_castle_db: guild_castle
guild_expulsion_db: guild_expulsion
guild_member_db: guild_member
guild_skill_db: guild_skill
guild_position_db: guild_position
guild_storage_db: guild_storage
party_db: party
pet_db: pet
friend_db: friends
mail_db: mail
auction_db: auction
quest_db: quest
// Map Database Tables
item_db_db: item_db
item_db2_db: item_db2
mob_db_db: mob_db
mob_db2_db: mob_db2
mapreg_db: mapreg
//Use SQL item_db and mob_db for the map server
use_sql_db: no
import: conf/import/inter_conf.txt

Как такое может быть? Не знаю есть разница или нет но у меня eamod

Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...
Яндекс.Метрика