Download the latest full database compilation from TrinityCore Downloads.
Search for the most recent version for the branch you are looking for. The naming follows a simple pattern - TDB (Short for Trinitycore Database), gameversion in numbers, year and month of creation attached with a release number for the month.
Example: TDB 335.21081 - This Database is for 3.3.5 branch (Wrath of the Lich King) from August 2021, release 1.
After you found your desired version, click on Assets to expand the list of attached files and download the .7z file at the top of that list. In our example above, that would be “TDB_full_world_335.21081_2021_08_15.7z”
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 -
hotfixes (the last one master only).
If you already have those databases on use you will need to edit create_mysql.sql file and your server config files to avoid data loss or errors on setup of database to use different database names:
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 by hand, only the file creating users. If you have plans to import databases manually you need to disable autoupdater on config files. Be aware that this is NOT recommended for new users.
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".
Start worldserver and press enter when it asks if you want to create databases. Do not start your Authserver/Bnetserver yet unless this step is done.
- If you get errors you may want to check your mysql login credentials in worldserver.conf and read the error message as it may tell you what to do.
- If you get errors finding the TDB_world_ file, make sure to cd into the /bin/ folder first.
- If you have hand created usernames, be sure they have create/alter/delete permissions.
- You may also have deleted or moved the source folder that was used to compile the server.
In that case you should set the setting called "SourceDirectory" in worldserver.conf under "CONNECTIONS AND DIRECTORIES" to point to the source folder you moved or downloaded.
After the server has created the databases it will look for dbc files, maps, mmaps and vmaps, if not found it will exit.
You will need to restart your server authserver/bnetserver if you made any changes to your reamlist table while they are running.
Both core and DB fixes will be committed to the TrinityCore repository, you can browse them here for 3.3.5 or here for master. You may also view them in Git Extensions by following the "Fetch" instructions in Keeping the Source Up-to-Date under Windows / Linux Core Installation (### TODO Links needed).
Pending fixes and/or open issues 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 under Windows / Linux Core Installation) and the appropriate updates will be automatically applied at server startup.
Note: You can run the following query on the World database to see your current DB and core revision:
SELECT * FROM `version`;
This assumes that you have completed the previous steps of the installation guide.
Note: If you have made any custom changes to your database, you may wish to backup (export) all three of them (world, characters, and auth) before performing the next few steps.
If your world database is ever corrupted (ex. creatures or objects are accidentally deleted), it is easy to revert it back to its original state by dropping your world database.
If you still have any problem, check: