Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.

Installation of Trinity Database (3.3.5a)

About once per month all of the updates made from all previous months are combined into a few bulk .sql files to easily import them into your databases. These updates are similar to how Service Packs are released for Windows. Furthermore, smaller, individual .sql updates are occasionally added as the core is fixed by the developers (these can be seen in Git Extensions while selecting individual commits in the commit view with the Diff tab selected). This offers two options:

...


Panel
borderColor#3399cc
bgColor#DCF1FC
titleColor#FFFFFF
titleBGColor#3399cc
borderStylesolid
titleGuide

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.

Sección


Columna

<< Step 3: Server Setup


Columna

Step 5: Networking >>




Nota

Before proceeding, please make sure that you have compiled your sources and they are up-to-date.


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.

Panel
borderColor#BBB
bgColor#F0F0F0
borderStylesolid

Contents

Tabla de contenidos
maxLevel2


Downloading the

...

database

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.

  1. For example, a file such as TDB_full_335.54_2014_07_05.7z tells us three things:
    • TDB: Trinity Database
    • 335.54: The version of the database and the client it belongs to. 335 = WoW version 3.3.5, 54 = the 54th full revision.
    • 2014_07_05: The date - July 05th, 2014

...

(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.
Advertencia
titleImportant

...

Usually there are multiple .sql files to choose from in the .7z archive.

If this is your first time installing TrinityCore, you will

...

ONLY need the file/s with the name starting by "TDB_full"

...

If you downloaded TDB 53 or higher NEVER apply sql files on sql\old directory, those files are only needed for people updating core between TDB releases dates.
Also don't apply sql files on sql/updates/auth or sql/updates/world on your fresh instalation, those files are only needed to update between versions.

 NEVER ENABLE CONTINUE ON ERROR ON YOUR SQL CLIENT. Also, you don't need to run sql files inside update_only on 1st instalations.

 

 

Installing The Trinity Databases

...

on the directory where your worldserver binary (worldserver on linux or mac, worldserver.exe on windows) is located.

(the files inside updates are made to update from older TDB revisions without having to apply every file if you have autoupdater disabled and you don't update between TDB releases (NOT RECOMMENDED)).

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

...

The following steps are done using the database management program you installed in Step #5 of Software Required (ex. HeidiSQL or SQLYog):

  • In HeidiSQL, click on the database you want to use in order to "select" it, then click Tools > Load SQL File... > (select the file) > Run file(s) directly.
  • In SQLYog, click on the database you want to use in order to "select" it, then click Database > Import > Execute SQL Script.
  • On mysql cli you must use mysql --default-character-set=utf8 to avoid import failures, WE STRONGLY RECOMMEND TO USE THIS METHOD over the SQLYog or HeidiSQL, it's the faster method by far to import TDB and needed updates.

 

  1. Create the three databases by importing ...\sql\create\create_mysql.sql. You now have three databases - auth, characters, and world. You may need to refresh your program in order to see the new databases.
  2. Click on the "auth" database and import the auth database structure by importing ...\sql\base\auth_database.sql.
  3. Click on the "characters" database and import the characters database structure by importing ...\sql\base\character_database.sql.
  4. Click on the "world" database and import the world database structure by extracting and importing the "TDB_full_*.sql" file you downloaded from the Database download section.
  5. Click on the "world" database and import any *.sql file available in your ...\sql\updates\world folder.
  6. NOTICE WE NEVER IMPORT sql\updates\auth or sql\updates\character files on fresh installation.
  7. NEVER ENABLE CONTINUE ON ERROR ON YOUR SQL CLIENT

...

titleImportant

...

  • 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.


Info
  • 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 maps and vmaps, if not found it will exit.


Info
You will need to restart your server authserver/bnetserver if you made any changes to your reamlist table.


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.

...


Expandir

Note:

...

 You can run the following query on the World database to see your current DB and core revision:

Bloque de código
languagesql
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.

  • Beginner:
      1. Extract the TDB_FULL.sql file from the archive and import it into your world database.
      2. If they exist, also import the characters_ and auth_ .sql files into their respective databases.
      3. Once this is finished and you have already compiled your source, you may run the worldserver binary to load your server. The revision update is complete.

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.

  • Advanced:

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:

Panel
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.

Bloque de código
languagebash
titleMerges all *.sql files in auth/characters/world folder.
firstline1
linenumberstrue
copy /b world\*.sql /b all_world_updates.sql

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/

...

titlePro Tip

...

Sugerencia
titlePro Tip

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.



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.

Insertar extracto
_Installation Helper
_Installation Helper
nopaneltrue


Panel
borderColor#3399cc
bgColor#DCF1FC
titleColor#FFFFFF
titleBGColor#3399cc
borderStylesolid
titleGuide

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.

Sección


Columna

<< Step 3: Server Setup


Columna

Step 5: Networking >>