Jump to content

Setting up a dual server environment


Recommended Posts

Hello I am trying to setup mangos on 2 boxes...

One with just the SQL ...and the other with just the applications.

They are both currently running debian lenny 5.0, I was able to successfully setup the code (as far as I can tell...) compiled, also setup the sql I believe correctly... on the 2nd server...

This is what happens when I launch Mangos-realmd,

----------------------

MaNGOS/0.17.0 (* * Revision 10878 - *) for Linux_x32 (little-endian) [realm-daemon]

<Ctrl-C> to stop

Using configuration file /opt/mangos/etc/realmd.conf

Database: 192.168.1.8;3306;mangos;MyPa$$word;realmd

Could not connect to MySQL database 192.168.1.8: Access denied for user 'mangos'@'prima.game-server.cc' (using password: YES)

Cannot connect to database

----------------------

The problem I believe is that it automatically appends the current localhost (prima.game-server.cc) to the username (mangos)

Where do I set the username to reflect the name on the SQL server... (192.168.1.8 or Protos)

Thanks!

Link to comment
Share on other sites

The mangos box adding its hostname to the username part ('mangos'@'prima.game-server.cc') shouldn't be a problem and i don't believe anything needs to be changed on the mangos box.

on your SQL box create new privileges that allows that host to connect using that username. If you have phpmyadmin or any other gui administration tool its pretty easy

You should be able to create a rule for

[email protected]

or

mangos@%

either way should allow you to access the sql database from your mangos box

Heres the SQL if you want to just blindly execute my code (note the line with scriptdev2 only needs to be executed if you use SD2)

Allow only [email protected]

CREATE USER 'mangos'@'prima.game-server.cc' IDENTIFIED BY 'MyPa$$word';
GRANT ALL PRIVILEGES ON mangos.* TO 'mangos'@'prima.game-server.cc' ;
GRANT ALL PRIVILEGES ON characters.* TO 'mangos'@'prima.game-server.cc' ;
GRANT ALL PRIVILEGES ON realmd.* TO 'mangos'@'prima.game-server.cc' ;
GRANT ALL PRIVILEGES ON scriptdev2.* TO 'mangos'@'prima.game-server.cc' ;

Allow only mangos@% (from any host)

CREATE USER 'mangos'@'%' IDENTIFIED BY 'MyPa$$word';
GRANT ALL PRIVILEGES ON mangos.* TO 'mangos'@'%' ;
GRANT ALL PRIVILEGES ON characters.* TO 'mangos'@'%' ;
GRANT ALL PRIVILEGES ON realmd.* TO 'mangos'@'%' ;
GRANT ALL PRIVILEGES ON scriptdev2.* TO 'mangos'@'%' ;

Also user mangos doesn't actually need ALL PRIVILEGES, I only did that so it was fast and easy. Giving it all privileges could be a security risk especially if you use the mangos@% method and your sql is accessible from the internet

Link to comment
Share on other sites

Thank you so much Antiroot and davemm,

You both were right..kinda...sorta.. lol

I some how...in my infinite wisdom made 2 mangos accounts on my SQL server ("mangos" and "Mangos")... and "mangos" had right to the database... but was only allowed to login locally... and "Mangos" didnt have rights to the databases, but could be used remotely... ugh

Maybe setting up servers late at night isnt always the best idea....;)

I now can launch the Mangos-realmd and Mangos-worldd and I can see them running in the terminals...

I created a user account, changed my realmlist.wtf to look at my LAN IP...(192.168.1.2 aka Prima)

When I connect to my server it takes the account name and password I setup...

In the realm list I see "MaNGOS" but when I try to join it says "Connecting..." then after about 5 seconds it kicks me back to the realm selection list... without a error.. :/ I haven't ever played wow before...so I am not sure where the logs are....I am setting this server up as a gift for my girlfriend...pretty geeky eh?

Also just a question.... do I have the MySQL available port (3306) forwarded outside of my router to have others connect from outside? or just the wow default ports....

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use