Databases Installation

Since this commit we introduced a new and automatic way of installing and keeping the databases up-to-date.

This is described in more detail in the following instructions.

Downloading the database

Download the latest database compilation from TrinityCore Downloads (you may need to click on Next at page footer to see the proper TDB files).

  • Note that there are different database compilations available for different branches of TrinityCore, for example 3.3.5 and master.

Search the database for the branch you are trying to use, for 3.3.5a it will be named TDB 335 and a 5 digits value, click on Assets and you should see a link to download TDB_full_*.7z.

For master branch search for the higher numbered version non TDB 335.

  • You want to download the file in .7z format - that is the database download and the others are not
  • The file is in .7z format, so you will need an archive program like 7zip to unpack it.

Creating the Trinity databases in MySQL

To create the MySQL databases needed by Trinity, you need to execute one of the following MySQL queries with your mysql client:

You can perform this with a MySQL client or with the MySQL command-line interface (CLI).

You would need to use one MySQL root account with your MySQL client or with MySQL CLI before starting core to run one of those files (use MySQL root only to import one of those files, never run core as root or administrator).

TIP: edit those 2 files and change default password to something else for increased security (remember to edit conf files to use new password).

By default Trinity needs three databases to run at 3.3.5 branch and four for master with the following names - AuthCharacters, World and hotfixes (the last one master only), if you already have those databases on use you will need to edit create_mysql.sql file and config files to avoid data loss or errors on setup of database to use different database names:

  • auth - holds account data - usernames, passwords, GM access, realm information, etc.
  • characters - holds character data - created characters, inventory, bank items, auction house, tickets, etc.
  • world - holds game-experience content such as NPCs, quests, objects, etc
  • hotfixes (master only) - holds fixes not already added to the core or other official databases.

Populating the MySQL Trinity databases

From the unpacked 7z folder copy the SQL files that start with "TDB_world_" and "TDB_hotfixes_" (hotfixes named file is master branch only) to the directory where your worldserver binary (worldserver on linux or mac, worldserver.exe on windows) is (DON'T RENAME THOSE FILES OR AUTOMATIC SETUP WILL FAIL).

NOTICE: you don't need to import any databases, only the file creating users. If you have plans to import databases manually you need to disable autoupdater on config files.

If you have plans to change default mysql usernames and passwords make sure you have set valid database login information and the table names you want to use in the same config files (authserver (3.3.5a only)/bnetserver (master branch only)/worldserver.conf) under "CONNECTIONS AND DIRECTORIES".

  • Notice that the databases are not created yet. The names you set in the config will be used for the created databases.

Start worldserver and press enter when it asks if you want to create databases.



After the server has created the databases it will look for maps and vmaps, if not found it will exit.

Keeping the DB up to date

Both core and DB fixes will be committed to the TrinityCore repository, which you may also view in Git Extensions by following the "Fetch" instructions in Keeping the Source Up-to-Date Windows / Linux. Pending fixes can be found on our tracker with data from the developers and contributors.



Thanks to the automatic DB updater the single step you have to do, is to fetch a new revision (Keeping the Source Up-to-Date WindowsLinux) and the appropriate updates will we applied at server startup.

Help

If you still have any problem, check: