This article is part of the Installation Guide. You can read it alone or click on the previous link to easily move between the steps. |
Before proceeding, please make sure that you have compiled your sources and they are up-to-date. |
Download the latest database compilation from TrinityCore Downloads.
The Download Packages at the top are the ones you want. Find the package with the latest date and download it.
The file is in .7z format, so you will need an archive program like 7zip to unpack it.
Note: There are multiple .sql files to choose from in the .7z archive. If this is your first time installing TrinityCore, you will want to import ONLY the file with "TDB_full" at the beginning. NEVER apply the sql files in the sql\old directory on fresh instalations, those files are only needed for people updating core between TDB releases that uses long time to update between revisions.
|
Trinity needs 3 databases to run - Auth, Characters, and World:
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. (if you are running 6.x - hotfixes as well) |
The following steps are done using the database management program you installed in Step #5 of Software Required (ex. HeidiSQL or SQLYog):
THIS INFORMATION IS UP TO DATED SINCE TRINITYCORE CREATION TO TODAY, AND UNLESS WE CHANGE THE SYSTEM IT WILL CONTINUE TO BE UP TO DATED, WE USED THIS SYSTEM SINCE THE START AND IT'S VERY UNLIKELY IT WILL CHANGE. |
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. Pending fixes can be found on our tracker with data from the developers and contributors.
As mentioned earlier, it is recommended to stay on the same revision as the TDB_full database (Beginner).
If you choose to brave the wilds beyond the current monthly revision, use the (Advanced) instructions below.
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 already completed the (Beginner) Keeping the Source Up-to-Date, which means you now have a newly downloaded revision archive.
This instruction also assumes that you have completed the initial Downloading the Database which had you import the TDB_FULL.sql, and it is now approximately one month later - a new revision has been released.
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.
Note: It is at this point that most user errors occur. If your worldserver.exe closes abruptly, make sure that your core's version matches your database version. Check that the `version` table in your world database matches the commit hash listed beside the archive you downloaded at TrinityCore Downloads.
If you update your source beyond a monthly revision, you will likely have additional updates in the ...\sql\updates folder. The folders within show which database they need to be imported to. For example, the "world" folder has all of the files that need to be imported to your world DB.
File naming conventions follow simple and consistent rules:
yyyy_mm_dd_id_world_tablename.sql -> World DB yyyy_mm_dd_id_character_tablename.sql -> Characters DB yyyy_mm_dd_id_auth_tablename.sql -> Auth DB "yyyy" = the year | "mm" = month | "dd" = day | "id" = daily id (incremental) |
Note: The incremental daily id starts at 00, with 00 needing to be imported first, then 01, then 02, etc.
It is imperative to know the date of your previous revision when updating in order to import all of the updates from that revision to your current one.
Then, simply follow these steps:
Note: If you are comfortable with executing batch files, you are welcome to use the batch file below to make the importing process easier. Also note that doing this will also gather up .sql files you may have already imported. In most cases this is safe, but you should use this batch file at your own risk. Take a look on the Combine SQL Updates thread in the TrinityCore forum for a more detailed batch script and informations. If you don't change the batch script, it must be saved and executed in your ...\sql\updates folder.
If you still have problems, read http://www.trinitycore.org/f/topic/328-unknown-column-missing-table-duplicate-column-error-sql-problems-sqldriverlogfile-answer-on-1st-post-of-1st-page/ |
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 re-importing the TDB_FULL.sql into your world database. If you updated your core using the (Advanced) instructions, make sure you also re-import all of the necessary C:\Trinity\sql\updates as explained above. |
If you still have any problem, check http://www.trinitycore.org/f/topic/10656-updating-or-starting-with-trinitycore-issues/ and http://www.trinitycore.org/f/topic/1518-trouble-with-your-trinity-install-readme-1st-faqs/