Multiple servers on a single machine

Hello.

I know this question has been asked many times, but I’ve seen some of the topics and none seem to really explain how to do it.

My question is simple. How can I make so that multiple servers, with different world databases (In fact, completely different versions, a master branch server and a 3.3.5 branch server) I don’t really want them to be RUNNING at the same time, Just that if I go to the folder where I have the server for the master branch, it opens without problems, and then if I open the server on the 3.3.5 branch, they don’t affect each other.

So how would I do it? New MySQL connection? Rename databases? (as in, Auth335 or something like that, on the same MySQL connection)

I figured it’d be renaming databases, but I don’t know exactly all I have to change, and where. Is it enough if I change it on the .conf files or do I have to change something pre-compile?

Thanks in advance to everyone.

(I hope I made myself clear, it cost me a lot to write this down for some reason)

The easiest way, as it wouldn’t require any changes to the database or TrinityCore, would be run multiple virtual machines using VirtualBox. You could set up very small Debian 8 based VMs that have only enough installed to build and run SQL and TrinityCore (and the VirtualBox Guest Additions) from the command line, which should only use about 6GB of HD space each. And the nice thing is that you could make one, then simply duplicate it. Once they are setup, you could use Linux file sharing to make your two sets of TrinityCore and server directories available to either your “bare metal” OS or an another VM where you use your preferred IDE, text editor, etc.

It would take a while to set it all up, but once did you would have two separate servers with a unified work environment. You could even run both servers at the same time if you wanted.

You would need at least 8GB of RAM to do this in a testing environment. 3GB min per VM when building using 4 threads (4.5GB if building with 6 threads) and about 2GB per VM when just running the server while testing things.

Its enough to just change the DB names in configs (and in DB hurr durr). I use this all the time to hop through the 5 different core/patch combinations I have.

http://i.imgur.com/CPIzrMd.png

I run 335 & master out of the box in ‘prod’ like this essentially from a small gitlab ci / chef. in this example its two ip addresses for consistent ports, but it could be changed for port changes on a single address.

This provides 335 and master on the same machine and 335 using the master auth. when a user with a different client logs in they will see incompatible for the other client-server version pair as would be expected.

In the ‘nonprod’ i have the same scheme, different addresses, and the userbase sees those as ptr/dev which they cannot login into/create on.

If something like this should be written up it would e my pleasure, i can revise it step by step and mark it up for confluence.

These are my notes.

[FONT=‘Courier New’]*** TC ***[/FONT]

[FONT=‘Courier New’]tc builds
- 335 (tc335)
* world server is only running, auth and bnet are not
* auth is provided by master
* tc335 stack binds to 192.168.0.20 (eg, *server.conf, BindIP = “192.168.0.20”, SOAP.IP = “192.168.0.20”)
* worldserver.conf RealmID = 1 (needs to be in tc_master_auth.realmlist)
- master (tcmaster)
* auth, bnet, world servers are running
* 335 support is provided
* tcmaster stack binds to 192.168.0.21 (eg, *server.conf, BindIP = “192.168.0.21”, SOAP.IP = “192.168.0.21”)
* worldserver.conf RealmID = 2 (needs to be in tc_master_auth.realmlist)[/FONT]

[FONT=‘Courier New’]*** MYSQL ***[/FONT]

[FONT=‘Courier New’]mysql> show databases;
±---------------------+
| Database |
±---------------------+
| information_schema |
| tc_335_auth | ← not used
| tc_335_characters |
| tc_335_world |
| tc_master_auth |
| tc_master_characters |
| tc_master_hotfixes |
| tc_master_world | ← dual realm (335 + master, realmid= #)
±---------------------+
8 rows in set (0.08 sec)[/FONT]

[FONT=‘Courier New’]mysql> select id,name,address,localaddress,localsubnetmask,port,gamebuild from tc_master_auth.realmlist;
±—±---------±-------------±-------------±----------------±-----±----------+
| id | name | address | localaddress | localsubnetmask | port | gamebuild |
±—±---------±-------------±-------------±----------------±-----±----------+
| 1 | tc335 | 192.168.0.20 | 192.168.0.20 | 255.255.255.0 | 8085 | 12340 |
| 2 | tcmaster | 192.168.0.21 | 192.168.0.21 | 255.255.255.0 | 8085 | 23937 |
±—±---------±-------------±-------------±----------------±-----±----------+
2 rows in set (0.00 sec)[/FONT]

I see, so auths are compatible, yes? I could just get the same auth with no problems.

They are not compatible in the way that you can run one and connect from both clients but they can share the same database (even if you run them both at the same time - but you need to use the database structure from master, there are more fields in tables)

Are you saying that master’s auth database is backward compatible with 335? Otherwise, can you elaborate how the mixed world servers from 335 and master are not compatible with having 335 auth run on master’s auth?

For 335 and master, both the world cli and soap allow creation, deletion, modification of accounts, bnets, bans, mutes, otp. In the wow client side, soap and console, changing passwords, character customizations, etc all work. Population ‘low/med/high’ works. I don’t see any sql errors or erroneous behavior. I can imagine at scale I could be missing something, I don’t think I have reached over 100 client connections.

If allowing 335 to use master’s auth is not compatible, are you also saying that multiple 335 worlds cannot use a single 335 auth (obviously after the config realmid and the realmlist table is sorted out)?

Yes, master branch auth database IS structurally backwards compatible with 3.3.5

master branch has additional tables not present in 3.3.5 (all of bnet) and columns (Region/Battlegroup in realmlist table)

Alright, so I managed to get some time to make some tests and did this

[ATTACH]2108._xfImport[/ATTACH]

Now that I’ve read that auth is backwards compatible, I’ll probably change the auth to be the same (though I don’t know how it would work). But first of all, I would need some help with this; when I open authserver, it works fine (it seems), but when I open worldserver, i get this: https://pastebin.com/h3cREhUe

Edit: I’ve tried to change the .sql files’ name, but doesn’t seem to work anyways.

[ol][li]DBUpdater: Given update include directory “C:/TrinityCore335/sql/updates/auth335” does not exist, skipped![/li][li]DBUpdater: Given update include directory “C:/TrinityCore335/sql/custom/auth335” does not exist, skipped![/li][li]DBUpdater: Given update include directory “C:/TrinityCore335/sql/old/3.3.5a/auth335” does not exist, skipped![/li][/ol]