Before you get scared by this long guide, we assure you the procedure is quite simple. Most of the following steps are to be performed only the first time you install Trinity and only the Trinity updating procedures will need to be run from time to time.

After the first few times everyone gets used to the procedure and never needs to look at this guide ever again.

Important: As the TrinityCore project is highly active, portions of the guide may be outdated. In case something fails, please check the forum, which will usually have the answer already.

Software Required Bearbeiten

  • Visual C++ 2008 Express [Free Download] (Download and run vcsetup.exe) or Visual C++ 2010 Express [Free Download].
    Beware, Express editions do not support 64-bit compilation by default and making them do so is arduous at best.
  • MySQL server [Community Edition Download] (We recommend to use the most recent 5.1.x version. If you choose to use other version, do NOT download the Essentials package or compiling will not happen.
    Also in this case download the 32bit version if you have a 32bit compiler and the 64bit version if you have a 64bit compiler.)
  • .NET Framework 3.5 [Download] (you should already have it via your Windows updates)

DO NOT USE NAVICAT : Due to NaviCat not being able to handle // style comments (standard SQL), we advice all users to stay VERY clear of the product - you have been warned.

  • CMake 2.8.2 for Windows [Download]
  • OpenSSL 1.0.0b for Windows [Download-32bit] [Download-64bit]
    (Download the 32bit version if you have a 32bit compiler and the 64bit bit version if you have a 64bit compiler)

If you use different PCs for compile/run Trinity, install one of the following packages on your Server-PC to avoid missing dependencies (dependig on your Visual Studio Version and your Server-PC Operating System)

  • Microsoft Visual C++ 2008 Redistributable Package SP1 [x86] / [x64]
  • Microsoft Visual C++ 2010 Redistributable Package [x86] / [x64] / [ia64]


Before you start this phase you need to have installed TortoiseHG and Visual Studio.

Pulling the Source Bearbeiten

Create a directory in which Core files will be pulled (for example: C:\Trinity).

Right-click on the directory and click on 'TortoiseHG' -> 'Clone a Repository'.

Fill in the data as follows:

Source Path:
Destination Path: C:\Trinity

Click on 'clone'. Wait a few minutes (or less) and all the files will be pulled in the directory C:\Trinity.

Configuring and Generating Visual C++ solutions with CMake Bearbeiten

As part of our ongoing bitchiness, we have set a few security measures in place to avoid you from choosing the same directories for source and build-locations - so make yourself a dedicated directory for it. In our case, we've placed it in D:\Build (your location will most probably be somewhere else).

Also, if you have downloaded the required software above, then you should have the MySQL / OpenSSL headers and related files already. Note:

- For OpenSSL, do NOT use the light version
- For MySQL, if you use anything other than 5.1.x, do NOT use the "essential"-version.

As quoted on the MySQL page :

The Windows "msi-essential-*" installers do not include: Instance Manager tool, Documentation, Development headers etc.

If you have installed the MySQL-Essentials of non-5.1 version then you WILL need to uninstall it and then install the FULL MySQL package.
If you use MySQL server 5.1, you can rely on MySQL files supplied with Trinity Core and even the Essentials package will do.

Similar considerations pertain to OpenSSL vs. OpenSSL Light, but so far Trinity Core doesn't provide any OpenSSL files and you really need to AVOID the Light version at all cases. Open the CMake GUI (window will look like the screenshot (or pretty similar at least).

The two top text areas are used to tell where CMake should look for the source tree, and also where to put the build files. 

Now set the source to where you have checked out the Trinity sourcecode (in this case C:/Trinity), and then set the Build directory to where you have created your dedicated folder (in this case D:/Build) using the Browse buttons as in the screenshots.

CMake Step2.pngCMake Step3.png

When you have set the source and build directories, you can click Configure.
And yes, CMake is capable of creating VS6, VS7 + VS7.NET, VS8, VS9 and VS10 solutions and project files.

CMake Step3.pngCMake Step4.png

Note! CMake is NOT a cross-architecture compiler; it merely generates the build files required for the compiler you choose.

CMake Step6.pngCMake Step7.png

After clicking Finish it will start chewing through the source code and analyze the CMakeLists.txt spread all over the source tree.
When done it will show you a list of options which it wants you to confirm (the red parts).


Go through them and check/uncheck those you want enabled/disabled (you can hover the options to see what they are used for).

The default ones are shown below, and we do not advice you to turn off SERVERS as it selects the actual server-daemons (no use in compiling nothing at all, eh?).

Datei:CMake Step10.png

If you have installed MySQL version other than 5.1, be sure to UNCHECK the WITH_MYSQL_SOURCES option. This tells CMake to look for include files and libraries in your MySQL installation instead of using the MySQL source files provided with Trinity Core (which are 5.1.50). Remember, unchecking WITH_MYSQL_SOURCES requires that you have full MySQL package (not Essentials) and that your selected compiler is for the same architecture (32bit/64bit) as your MySQL. If you have 5.1.x, you need not worry - just leave WITH_MYSQL_SOURCES checked.

Now you have most probably also seen some text in the large white textbox.
You will find notifications from CMake here, and also information about what it has found / not found of libraries/headers and the likes.

In our case, we have a fully installed system:

- it detects that we're on a 64-bit platform
- it detects that we have a proper version of MySQL
- it detects that we have a properly installed OpenSSL libraries/headers -installation

In short, it's happy about our setup, but still wants us to verify the information.
In other words it wants us to click on Configure again to verify what it has detected.

When CMake has verified the information, and not found any more "errors" that it wants to complain about, it'll remove the red stuff, and wait for further input.

Click on Generate, and it will happily start chugging away and creating the solutionfiles/projectfiles/makefiles it requires to build for that specific compiler.

When done, it'll state "Generating done", and let you start compiling from the generated solution files.

So, open the build folder, then open the solution file and proceed to the next step - Compiling the Source.

Compiling the Source Bearbeiten

Go on the top menu 'Build' and click on Configuration Manager. Make sure you set the build to 'release Win32' or 'release x64' depending on the Operating System Trinity will be running on and what you have set during CMake configuration.

Warning:  Visual C++ 2008 Express edition does not support the 64 bit platform.  You will need to install the full Visual Studio, as well as additional components to enable 64 bit support.  Refer to Microsoft's website and documentation for more details.
Now go back to the 'Build' menu and click on 'Clean Solution'. Unless you are just testing a compilation, it is always best to clean your build before compiling your new Trinity revision. Compilation length differs from machine to machine, you should expect it to take 15-30 minutes.

You will find the following message once the compilation has finished successfully:

========== Build: 14 completed, 0 failed, 0 up-to-date, 1 skipped ==========

You will find your freshly compiled binaries in the D:\build\ folder as we have specified during the CMake configuration process.

You will need the following files in order for the core to function properly:


Some files might not be there (i.e. libeay32.dll, libmySQL.dll, ssleay32.dll) and so you might have to copy them over from the original installation/bin directories (OpenSSL/MySQL).

Delete any other file which is not in the above list, you will not need them.

Keeping the code up to date Bearbeiten

TrinityCore Developers are always at work fixing and adding new features to the core. You can always check them here or by using the ToroiseHG View Changelog option.

Simply right-click on your C:\Trinity folder and click on 'TortoiseHG' -> 'Synchronize'. Click on the button 'pull' at top of the window and it will start pulling the new/updated files. Once it is finished click on 'Update to Branch Tip' at the bottom of the window and you are done! Now you can repeat the compiling procedure above.

It is always best to remove the binaries from the C:\Trinity\bin folder every time you compile a new revision (and remember to clean your build).


Before you start this phase you need to have installed TortoiseHG, MySQL Server and SQLYog (or MySQL GUI Tools).

Pulling the Source Bearbeiten

Create a directory in which DB files will be pulled (for example: C:\TDB).

Right-click on the directory and click on 'TortoiseHG' -> 'Clone a Repository'.

Fill in the data as follows:

Source Path:
Destination Path: C:\TDB

Click on 'clone'. Wait a few minutes (or less) and all the files will be pulled in the directory C:\TDB.

Installing MySQL Server Bearbeiten

When configuring MySQL make sure you remember the password you set for the default root account and that you enabled both MyISAM and InnoDB engines.

You can leave all the other settings as default. You might want to enable remote access to your MySQL server if your are also testing a website for your Trinity server or if you have friends testing with you which need access from remote. Remember that this will decrease the security level of your MySQL server!

Installing The Trinity Databases Bearbeiten

Trinity needs three databases to run:

auth - holds accounts data.
characters - holds characters data.
world - holds game-experience content such as spawns, stats, quests, etc.

Note:  The auth database was previously named realmd.  If you are having trouble and searching the forum for solutions, any reference to the realmd database now refers to the auth database.

The first two are to be taken from the Core directory, the world DB is to be taken from the TDB directory.

1) Create the three databases by importing C:\Trinity\sql\create\create_mysql.sql. You now have three databases called auth, characters and world.

2) Import auth database structure by importing C:\Trinity\sql\base\auth_database.sql in the auth DB.

3) Import characters database structure by importing C:\Trinity\sql\base\character_database.sql in the characters DB.

4) Unzip C:\TDB\full_db\ and import world DB structure and contents by importing in the world DB.

5) Import all *.sql update files from C\Trinity\sql\updates which start with a number above '8874' so that your DB structure is up to date with the revision you just pulled and compiled.

Note: Now your world DB structure is for TrinityCore revision 9847. You need to import the update files to have the proper world DB structure for the revision you just pulled and compiled.. You will notice they are all named XXXX_world_tablename.sql or XXXX_character_tablename.sql or XXXX_auth_tablename.sql, and you need to import the *_world_*.sql files only!

 XXXX_world_tablename.sql  ->  World DB
XXXX_character_tablename.sql  ->  Characters DB
XXXX_auth_tablename.sql  ->  Realm DB

Keeping the DB up to date Bearbeiten

Trinity Developers are always at work fixing and adding new data to the DB. Unlike Core development, DB updatepacks come more on a 1-2 times a month basis with many fixes from the forum and a lot of new data from the Developers and contributors.

Simply right-click on your C:\TDB folder and click on 'TortoiseHG' -> 'Synchronize'. Click on the button 'pull' at top of the window and it will start pulling the new updatepack. Once it is finished click on 'Update to Branch Tip' at the bottom of the window and you are done! Now you can repeat the compiling procedure above.

Updating the DB following core updates Bearbeiten

It is recommended that you stick to the same revision as the TDB Updatepack but if in any case you decide to update your core, there are world/character/auth database updates that are supplied from both the core sources and on the forums. Usually when a developer commits a change which requires DB content it will be posted on the Core related DB Content section located here on the forums.

Bear in mind that you will need to know which revision your core is currently running on and which revision you have updated to. Either run "SELECT * FROM `version`;" (without quotes) on the World DB or remember which TDB Updatepack you have applied and which revision it is associated to if you have not updated past the supported revision for the Updatepack.

Look inside C:\Trinity\sql\updates\ folder after you have Synchronized and you will see a number of .sql files. Now import the *_world_*.sql file to your WORLD DB, where the first "*" is the revision CLOSEST to your current one.

Next follow the previous step for the AUTH and CHARACTERS DB and import the *_auth_*.sql or *_characters_*.sql respectively.

This way you will be able to keep your core updated past the Updatepack's supported revision.

NOTE: Core revisions after the recommended revision selected for the TDB Updatepack MAY be crashy and have problems so do not expect perfection from all revisions as such. If there is a crash, post the crash log on the Issue Tracker located here


Now that you have the Source compiled and the Databases installed, you need to set up the server.

Extracting DBC, Maps and VMaps files Bearbeiten

In order to run Trinity needs dbc and maps files. In addition, if you want to enable vmaps (mobs not seeing through walls, etc) you will need to extract them as well.

Warning: use Trinity's extractors. If you use extractors from other projects it is almost certain that your TrinityCore will not recognize the extracted data!

There are two ways in which you can obtain the extractors. Either you compile them yourself or you download them from the TrinityCore Repo Download section.

 ==== Compiling the Extractors  ====
Compiling libmpq Bearbeiten

Inside compile the soluiton file (libmpq_VC90.sln or libmpq_VC100.sln whether you use VS 2008 or VS 2010) in release mode. Once compiled take the file \externals\libmpq\win\VC90\libmpq__Win32_Release\libmpq.lib (or \externals\libmpq\win\VC100\libmpq__Win32_Release\libmpq.lib) and move it to \externals\libmpq.

Now you can compile the extractors as explained below.

Compiling all extractors Bearbeiten

Inside the \src\tools directory you will fine the ExtractorToolsVC90.sln. Open it up with VS2008 and compile it the same way you did with the core. (Build->Conguration Manager->Release->Win32) After compiling the solution you should now have 3 files in src\tools\bin\Win32_Release:


Now create a file called makevmaps3_simple.bat open up notepad or any other text editor and enter the following lines:

md vmaps
vmap3assembler.exe Buildings vmaps


Now save the file as makevmaps3_simple.bat and copy all the files to your WoW Client directory.

Skip the next step and go to Extracting DBC/Maps/VMaps.

Downloading prebuilt extractors Bearbeiten

Another way is to download the prebuilt extractors from the TrinityCore Repo Download section. These extractors will be updated from time to time if there has been a change made to the map extrators.

Download the from and extract them to your WoW Client Directory.

Extracting DBC/Maps/VMaps Bearbeiten

Now that you have extracted the maptools to your WoW client directory, run your WoW Client once (the login screen is enough). You need to do this so that the 'mapextractor.exe' knows where your WoW Client is and where to extract the files from.

Now you can run 'mapextractors.exe' and you will find two directories in your WoW Client directory called 'dbc' and 'maps'.

Move them where your Trinity binaries are (C:\Trinity\bin\Win32_release or C:\Trinity\bin\x64_release).

Extracting vmaps will take quite a while depending on your machine (1-2 hours). But this step is completely optional but highly recommended.

Run makevmaps3_simple.bat. It will take a long time. It will first create a directory called 'Buildings'. Then it will start extracting files to the directory 'vmaps'.

You will see some progress in the application's window as the extraction is being done. Do not attempt to stop the process. When it is done it will ask to "press any key" to terminate the program. Then only the extraction is complete.

Configuring the Server Bearbeiten

First of all you need to change the extension of worldserver.conf.dist -> worldserver.conf and authserver.conf.dist -> authserver.conf (make sure you enabled "show known files extensions" in the Windows folder option). Then you can edit them.

worldserver.conf Bearbeiten

Edit MySQL account username and password (instead of trinity;trinity).

LoginDatabaseInfo     = ";3306;trinity;trinity;auth"
WorldDatabaseInfo     = ";3306;trinity;trinity;world"
CharacterDatabaseInfo = ";3306;trinity;trinity;characters"

If you haven't extracted vmaps then edit the following:

vmap.enableLOS = 1 -- set this to 0
vmap.enableHeight = 1 -- set this to 0
vmap.ignoreSpellIds = "7720"
vmap.petLOS = 1 -- set this to 0
vmap.enableIndoorCheck = 1 -- set this to 0

authserver.conf Bearbeiten

Edit MySQL account username and password (instead of trinity;trinity).

LoginDatabaseInfo     = ";3306;trinity;trinity;auth"

Realmlist table Bearbeiten

You need to make sure that authserver.exe directs incoming connections to your realm. In the auth DB there is a table called realmlist. You need to edit the field address according to your needs: -- Leave default localhost if you are connecting alone from the same machine Trinity runs on. 
LAN ip -- Use the machine's LAN ip if you want other computers from the same network as Trinity's to connect to your server. 
Public ip -- Use your public ip if you have friends and testers which need to connect your server from the internet. 

Warning: The TrinityCore Team and Owners DO NOT in any case sponsor nor support illegal public servers. If you use these projects to run an illegal public server and not for testing and learning it is your own personal choice.


This guide is for beginners and states what to do and what to edit, assuming you left everything else with default values. Visit the following threads and post questions if you still need special support: