Moving db out of virtual box problem

04/18/2011 12:54 anichillus#1
Hey guys,

Have some problems with this. I'm trying to move the DB out of VirtualBOX to the actual PC(linux).
There are a couple of reasons for doing this. Mainly the PC is designated to be a game server, and i'd like to have only one VirtualBox started and only one MySQL on linux which handles all other metin2 databases.
So my config is
Linux PC - server MT2 1
- server MT2 2
....
I'll refer to the actual PC as linux.
This is my channel 1 config:
Quote:
HOSTNAME: channel1
CHANNEL: 1
PORT: 13000
P2P_PORT: 14000
DB_PORT: 3306
DB_ADDR: 192.168.1.50
MAP_ALLOW: 1 2 3 4 5 6 7 8 9 10 11 21 23 24 25 41 43 44 45 61 62 63 64 65 66 69 70 71 72 73 104 108 109 67 68 80 74 75 76 77 78 79 100 101 103 105 107 110 111 112 180 190 191 192 193 194 206
#MAP_ALLOW: 113 184 185 186 187 188 189 193 179
TABLE_POSTFIX:
PASSES_PER_SEC: 25
SAVE_EVENT_SECOND_CYCLE: 180
PING_EVENT_SECOND_CYCLE: 180
PLAYER_SQL: 192.168.1.50 mt2 mt2!@# player
COMMON_SQL: 192.168.1.50 mt2 mt2!@# common
LOG_SQL: 192.168.1.50 mt2 mt2!@# log
LOCALE_SERVICE: germany
#TEST_SERVER: 1
#NO_PK: 1
MALL_URL: google.de
adminpage_ip0: 192.168.1.20
admin_page_password: somepassword
VIEW_RANGE: 20000
CHECK_MULTIHACK: 1
Did i do it right? I have to mention i get NO errors when starting the server. The Linux MySQL is configured to allow the user mt2 from any host and no errors there either. But with all this, the client gets stuck after entering correct username and password. If i enter it wrong it tells me that "Wrong username or password".
Other questions i have
- "PORT" - is the channel's port which has to be forwarded from the router?
- What is "P2P_PORT" and does it also have to be forwarded ?
- Do i have to also forward the 3306 port ? Or that's only between the server and MySQL db ?
- How do i edit the db, game and auth files ? Only hex edit? Can't they be de-compiled ?

Please help me guys, this is driving me nuts.
Big THANKS!
04/18/2011 13:08 'aiiR7#2
Well,
This settings are wrong!

PHP Code:
DB_PORT3306
DB_ADDR
192.168.1.50 
--

This settings are only for the db-cache on the metin server, not for the mysqlserver!
So the db_port value must set to 15000/15001 and the db_addr value must set to localhost, becouse the db-cache is running on the same system like the metin server.

PHP Code:
PLAYER_SQL192.168.1.50 mt2 mt2!@# player
COMMON_SQL192.168.1.50 mt2 mt2!@# common
LOG_SQL192.168.1.50 mt2 mt2!@# log 
That seems to be right, i hope you created the user "mt2@%" or "mt2@yourip" on your linux machine with the password "mt2!@#".
04/18/2011 13:17 anichillus#3
Quote:
Originally Posted by iceE' View Post
Well,
This settings are wrong!

PHP Code:
DB_PORT3306
DB_ADDR
192.168.1.50 
--

This settings are only for the db-cache on the metin server, not for the mysqlserver!
So the db_port value must set to 15000/15001 and the db_addr value must set to localhost, becouse the db-cache is running on the same system like the metin server.

PHP Code:
PLAYER_SQL192.168.1.50 mt2 mt2!@# player
COMMON_SQL192.168.1.50 mt2 mt2!@# common
LOG_SQL192.168.1.50 mt2 mt2!@# log 
That seems to be right, i hope you created the user "mt2@%" or "mt2@yourip" on your linux machine with the password "mt2!@#".
Thank you !, I'll try that now.
Yes, of course i created the user.
fingers crossed :D
04/18/2011 13:19 'aiiR7#4
Quote:
Originally Posted by anichillus View Post
Thank you !, I'll try that now.
Yes, of course i created the user.
fingers crossed :D
If you have any problem about this, do not hesitate to contact me, i can help you.

--

PS: Which linux do you have? - CentOS, Debian, Ubuntu?
04/18/2011 23:27 anichillus#5
Yes, it worked !
I have ubuntu. I thought about it and creating the user mt2@% it's big security leak...anyone can connect to your db and change anything... so it'll be mt2@VirtualBox_IP

I guess i only have one question left:
"- How do i edit the db, game and auth files ? Only hex edit? Can't they be de-compiled ?"
Thanks so much iceE' !
04/19/2011 02:05 'aiiR7#6
Quote:
Originally Posted by anichillus View Post
Yes, it worked !
I have ubuntu. I thought about it and creating the user mt2@% it's big security leak...anyone can connect to your db and change anything... so it'll be mt2@VirtualBox_IP

I guess i only have one question left:
"- How do i edit the db, game and auth files ? Only hex edit? Can't they be de-compiled ?"
Thanks so much iceE' !
No problem, dude,
You can extract these files with upx, you can edit them with hex and ida.
04/19/2011 11:37 anichillus#7
Quote:
Originally Posted by iceE' View Post
No problem, dude,
You can extract these files with upx, you can edit them with hex and ida.
Thx, i tried with IDA, but caught my ears in it... :) don't know what to do. I was trying to convert it so it can be used in linux and thus eliminate the need to use a virtual box...i tried exporting it as .c and recompiling it under linux but failed. I guess we'll still use freebsd for now.
04/19/2011 12:25 'aiiR7#8
Quote:
Originally Posted by anichillus View Post
Thx, i tried with IDA, but caught my ears in it... :) don't know what to do. I was trying to convert it so it can be used in linux and thus eliminate the need to use a virtual box...i tried exporting it as .c and recompiling it under linux but failed. I guess we'll still use freebsd for now.
I do not believe someone who says his server is running without problems on a linux system.
The server have to run on freebsd, otherwise the server will not start and give you much errors.