Creating 2 Realmd using WoW Mangos Private Server

Some people have requested a guide on how to create or link their WoW Private server realmd so their users can choose whatever realmd they want to login to (for example, the first realmd is the PVP World, while the second realmd is to those who prefer normal world) :) … and that’s why i decided to create this guide, and hopefully it’ll be not confusing (i tried my best to make it easy to understand but you judge it by yourself) :)

So here goes the guide :

Requirements:
1. Have lots of free memory / RAM left for best result (i’m using 3GB DDR2 Dual Channel RAM)
2. Mangos already worked and you can use it before trying to attempt this ;)

Note : Depending on which mangos revision you’re using the realmd column might be different (if you’re using my 4602 version then you can just use the same sql query as shown in this example)

Note 2: You just need to have 1 account to login to each realmd, but it’ll use different data inside each database used

Here are the steps :

1. First make a copy of your mangos (or your mangos directory), so in the end you’ll get two mangos directory, in this example i was using my own compiled version 4617 (my latest version which is available for download for everyone is 4602)

Mangos directory

2. Now you need to open the command prompt and then type

mysql -u root -p -D realmd

# UPDATED 29 November 2011
INSERT INTO realmlist ( name, address, port, realmflags ) VALUES ( 'MY SECOND REALMD NAME', 'IP ADDRESS OR HOSTNAME', 'PORT NUMBER', 2 );

# After finished with the above. Type below code so you can see the new realm ID which is going to be used later
SELECT id, name, port FROM realmlist;

Where:

  1. Realmd Name should be change to whatever you like and
  2. IP Address Should be changed to 127.0.0.1 if you run and going to access the second Mangos process on the same computer or change it to LAN IP Address / Public IP Address if the second mangos process running and going to be accessed on different computer
  3. Port should be changed to anything other than 8085 (default port used by mangos which is going to be used by the first instance) if you’re going to run it on the same computer
  4. and optionally change the server type

3. After finished with the above process, now of course you’ll need to create new Mangos Database for your second realmd, and to do this we need to create a new database and then import the Mangos-UDB.sql file (if you’re using my 4602 release) or adjust it as necessary if you’re using another release, see below image for the example:

3.1 Creating New Mangos Database

Create new mangos db

Type:

mysqladmin -u root -p create second-database-name

If you can’t see the command used on above image

3.2 Importing Mangos DB

Import mangos db

After finished creating new database for your second database, now you’ll need to import the fully working database from before into your newly created mangos database (if you’re using my 4602 release, the database name was called mangos-udb.sql and can be found in reaper-eazy-mangos folder)

Note: If you followed my guide on creating wow private server using mangos. In this step you need to import the UDB sql file into the second database (the database which is created at step 3.1) like what you did at the Installing UDB part on that guide, followed with applying all the updates :D … but of course it’ll be troublesome to redo everything, so to make things easier and faster, all you have to do is execute the command below

mysqldump -uroot -p --opt mangos > mangos.sql
mysql -uroot -p -D second-database-name < mangos.sql

4. Now you just need to go inside your second mangos directory which is created at step #1 and then open mangosd.conf inside that directory and search for this line :

RealmID = 1
and replace it with:
RealmID = X (where X is the ID you retrieved earlier on step 2)

and then search for :
GameType = 1
replace it with :
GameType = 0

and now search for :
WorldDatabaseInfo = "127.0.0.1;3306;mangos;mangos;mangos"
and replace it with :
WorldDatabaseInfo = "127.0.0.1;3306;root;your_mysql_root_password;second_mangos_database_name"

finally search for :
WorldServerPort = 8085
and replace it with :
WorldServerPort = 8086

The above step was done because the previous mangos user doesn’t have the privilege to touch that new database name so we need to use root that has global privilege (this is the most quickest and dirtiest way) :P

As a side note, it’d be better for you to create new username for your second database and grant privilege to it for better security (it’s not good to use root account) :)

5. Run the realmd.exe from any of your mangos directory (the first directory which was there before, or the new mangos directory which is created for this purpose), and then run mangosd.exe from the first directory and the second directory
So that result in three new process created … 1 realmd.exe, and 2 mangosd.exe from different directory

6. Now login with your previous username or create a new username and if you’ve done all of the above steps correctly you’ll see two realmd that you can use as shown on below image :

6.1 Realmd Selection Screen

Realmd selection screen

6.2 The first Database With all the characters from before (i think you’ve already seen all the characters used for the screenshot lol)

First wow realmd

6.3 The Second Realmd which is used for this guide

Second wow realmd

That’s it i hope you can understand the above explanation … and just like before, if i missed anything just let me know about it :)

Comment?

Note: Comment may not appear right away.

103 comments on “Creating 2 Realmd using WoW Mangos Private Server

  1. OK i got the server running with no prob, i cant figure out how to get a dign in page running at all and now this 2nd realm thing is driving me nuts. i got it when i log in i see all 3 realms and can log into all 3 of them BUT they are all the same … same scharacters and everything, so if i delete from 1 realm it deletes that alt from all 3 realms. i know ihafta be missing something here, even tho that has to have been the most confusing guide i have read yet. i am using navicat, mysql and of course reaper x mangos 5225, seeing as how the guide wasnt to helpful can someone tell me what i am doin wrong .. i did everything just like this guide said and still nothing .. or is this guide seriously outdated and dont work for 5225?

  2. i have done everything right now and i have two realms but when i open the first mangos it can’t find the error loading ‘ gameobject.template’ table (not exist?)
    what can i do?

  3. Hi, I have 2 mangos.exe
    one on a PC and another on a second PC.
    I want to use an only reaml.exe on one of two PC.

    Problem is when I insert the ip in the mangos.conf of the realm.exe on other PC, I have a connection mistake to the DB

  4. Has anyone had a problem with actually logging in to a second realm on their server? I can see the realm when I log in, but when I try to get on the new realm, it bounces me back to the list of realms. The original realm is still accessible. I’ve got all the ports forwarded correctly (the original realm works fine). I’ve also tried addressing the 2nd database with the root user and password in mangosd.conf. I have also given the mangos user permissions to the new databases in MySQL. Any ideas?

    Reaper– Thanks for all the time you put into this. You Rock!

  5. weiss935 i got dc and you went offline i hope u get it sorted im not familiar with the dlink but u need to get port 8085 and 8086 forwarded on ure internal ip 192.168.1.3 and it didnt seem to work

  6. i’ve fixed that:P now when my server is upp i just find the second realm. but i have both mangosd open and one realmd open.

  7. “127.0.0.1;3306;root;yourpassword;yoursecondmangosdatabasename”

    I don’t know my seconddatabasename or my password.
    how do i get them?

  8. ALL with 2 realms and same characters. It is an easy fix actually. you need to create a second character database and add it into your mangosd.conf same as you did with the realm. ex: i named my second mangos database `mangos2` and i also created `characters2` then upload your characters.sql to database. and chage mangosd.conf. Hope this helps.

    -Chris

  9. ok for anyone wanting to have different characters on each realm here is wat you have to do:

    1. edit mysql with your preffered tool i used phpmyadmin which is quite user friendly.

    go into the characters database and click operations and then at the section copy database to type in characters2 then ensure structure and data is selected and click go.

    2. open the mangosd.conf for the second server and edit this line:

    CharacterDatabaseInfo = “127.0.0.1;3306;mangos;mangos;characters”

    to:

    CharacterDatabaseInfo = “127.0.0.1;3306;mangos;mangos;characters2”

    now i also creates another user so my line is:

    CharacterDatabaseInfo = “127.0.0.1;3306;mangos2;mangos;characters2”

    note the user us mangos2 however im no certain u need to do this as i havnt tried without it if u do simply go to the home page of phpmyadmin and click privelages and then create new user ensure u set the username to mangos2 and password to mangos and give the user full privelages to the relevant databases i.e realmd and characters2 and so on..

    hope this helps

  10. n1t3 i found the solution jst after my last post lol

    project needs
    1. need 1 realm server
    2. need 2 mangos server running pointing to same realmd but different db
    3. edit realm config to load both realms
    4. make 2 database name 1 mangos and other mango
    5. make sure both database are starting properly

    follow these steps and should be no problems.

    hope this helps im gna try it now

  11. very grateful if someone has a solution to the character system i.e having diff characters for each realm, im kinda thinkin u would need 2 databases but if not please let me know :)

  12. sorry this was for weiss935

    ok i know ure problem mate u have copied a line from this post and as reaper stated it will give u curly quotes ““ see the difference go into ure config and replace the quotes with normal quotes this will resolve the problem

  13. ok i know ure problem mate u have copied a line from this post and as reaper stated it will give u curly quotes ““ see the difference go into ure config and replace the quotes with normal quotes this will resolve the problem

  14. when i open the second mangosd it just stood could not connect to mysql database at Ô127.0.0.1: unknown mysql server host ‘Ô127.0.0.1’

    Cannot connect to world database Ô127.0.0.1

  15. im having this same problem you create a character in one realm and when u switch realms the character is on the second realm can this be resovled?

  16. -d unknown command.

    Any reason?

    *******************************
    C:\Documents and Settings\Jeremy>mysql -umangos -pmangos -d realmd
    mysql: unknown option ‘-d’
    ********************************

  17. acount ranks can be changed on 2 ways,
    easy in mangosd.exe or some harder in sqlyog

    -open mangosd.exe and type setgm ‘name’ ‘rank’
    3 = admin
    2 = gm
    1 = moderator
    0 = player

    or the harder way:
    -open sql yog, go to the realmd db,
    then to account and search for the player and set his rank (collum nr. 4)