Jump to content

Setting up SQL problem

By Смердокрыл
in Serverside

Recommended Posts

Hey!

I decided to try, once again, to compile a server on my own. I followed this guide, using this source. All was fine until I got to the part where you set up the SQL tables. I connected to root (using Navicat), ran create_mysql.sql, and ended up having the following databases: auth, characters, information_schema, mysql, performance_schema, test, and world. Auth, characters, test, and world are empty.

Following the guide, I downloaded TDB_full_world_434.15_2017_01_02.sql and placed it in the same folder as bnetserver.exe. I then ran the latter in hopes that it would prompt me to create databases and all would be wonderful, BUT NO! Bnetserver.exe just closes instantly (which makes sense, since there are no tables for it to connect to).

What should I do?

or not


 skarnnoggitlogpost.thumb.jpg.d752b4e8541

Link to comment
Share on other sites

It should be like this:

  1. Download TC source by using Git.
  2. Install MySQL server and open Navicat/SQLYog/Whatever (btw, Navicat is not recommended)
  3. Go to your src folder and run sql script from sql/create/ to create your databases
  4. Go to sql/base/ and run auth sql script on your auth database and characters sql script on your characters
  5. Download TDB and run (only its main, the biggest one) script from there on your world database

In order to "run a script on your daabase", its probably the easiest to open SQL editor (SQLYog, Heidi... Navicat is, once again, not recommended) and then you usually need to right-click on your database (auth/characters/world) and then click on something like Import script. Like Ohai said, make sure you are executing scripts for your databases on correct databases, as you can't run world script on auth database, for example. 

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

11 hours ago, Ohai said:

4.3.4 build is failing

What does that mean?

3 hours ago, Amaroth said:

It should be like this:

  1. Download TC source by using Git.
  2. Install MySQL server and open Navicat/SQLYog/Whatever (btw, Navicat is not recommended)
  3. Go to your src folder and run sql script from sql/create/ to create your database

I did this

3 hours ago, Amaroth said:

Go to sql/base/ and run auth sql script on your auth database and characters sql script on your characters

Question is: where do I get those sql files drom? The tdb archive only contains "updates" of those, and the world one

Also, why is Navicat not recommended? I don't mind using something else but I've really got used to the interface

or not


 skarnnoggitlogpost.thumb.jpg.d752b4e8541

Link to comment
Share on other sites

4 hours ago, Amaroth said:

sql/base/

Is in your TrinityCore's source folders, which you have downloaded by using Git. Files to create databases and to create auth and characters databases are being stored there. TDB contains only world database data and tables, not auth and characters, those are being downloaded with source files.

Why is not Navicat recommended? I'm not sure, I've heared that it doesn't support some comments or whatever. If TC developers say that we are not supposed to use Navicat, at least not for creating our databases, well, who am I to argue with them. I¨ve given you a screenshot with an example of executing sql script on a database in SQLYog.

tmp.jpg

tmp.jpg

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

4.3.4 is not a supported branch so could be that its fucked up atm not working, not sure

Auth and characters shouldn't be empty thats for sure, the sql files should be in your --- C(or)D:\TrinityCore-4.3.4\sql\base (Amaroth replied faster with pictures ⇑⇑⇑ :p)

and world u get from here https://github.com/TrinityCore/TrinityCore/releases this is the latest 4.3.4 https://github.com/TrinityCore/TrinityCore/releases/tag/TDB434.09 ?

And yes Navicat isn't recommended try getting SQLyog or Workbench, wouldn't recommend my SQLs either lol recalled I had trouble myself compiling 4.3.4 back then, in the end copied all DBCs from a repack and added some quest SQLs from ACweb or somewhere +some manual hacks to get worgen languages , so quite a mess

Link to comment
Share on other sites

Yep, it seems so.

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

19 minutes ago, Amaroth said:

Yep, it seems so.

Characters_database.sql worked fine, but I get errors with auth_database.sql:

Spoiler

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table str' at line 1
[Err] ;
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `updates_include`
--

DROP TABLE IF EXISTS `updates_include`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `updates_include` (
  `path` varchar(200) NOT NULL COMMENT 'directory to include. $ means relative to the source directory.',
  `state` enum('RELEASED','ARCHIVED') NOT NULL DEFAULT 'RELEASED' COMMENT 'defines if the directory contains released or archived updates.',
  PRIMARY KEY (`path`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='List of directories where we want to include sql updates.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `updates_include`
--

LOCK TABLES `updates_include` WRITE;
/*!40000 ALTER TABLE `updates_include` DISABLE KEYS */;
INSERT INTO `updates_include` VALUES ('$/sql/updates/auth','RELEASED'),('$/sql/custom/auth','RELEASED'),('$/sql/old/4.3.4/auth','ARCHIVED');
/*!40000 ALTER TABLE `updates_include` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `uptime`
--

DROP TABLE IF EXISTS `uptime`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `uptime` (
  `realmid` int(10) unsigned NOT NULL,
  `starttime` int(10) unsigned NOT NULL DEFAULT '0',
  `uptime` int(10) unsigned NOT NULL DEFAULT '0',
  `maxplayers` smallint(5) unsigned NOT NULL DEFAULT '0',
  `revision` varchar(255) NOT NULL DEFAULT 'Trinitycore',
  PRIMARY KEY (`realmid`,`starttime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Uptime system';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `uptime`
--

LOCK TABLES `uptime` WRITE;
/*!40000 ALTER TABLE `uptime` DISABLE KEYS */;
/*!40000 ALTER TABLE `uptime` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2015-03-21 21:48:22
[Msg] Finished - Unsuccessfully
--------------------------------------------------

 

or not


 skarnnoggitlogpost.thumb.jpg.d752b4e8541

Link to comment
Share on other sites

Idk. Incorrect MySQL version. Incorrect used editor. Incorrect something. Do you have recommended MySQL version?
" Use the most recent 5.6.x version or 5.5 with mysql server configuration, DON'T use 5.7 version unless you know VERY WELL what are you doing, you will have issues with 5.7"
And like I said, don't use Navicat.

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

Well, I just trust judgement of TC devs. 

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

It used to be there for a very long time. Then they have apprantly simply removed that, for some reason (I can no longer find it). Anyway, they haven't written it back into list of recommended MySQL editors.

English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

I am now completely retired from modding. I am still reading PMs and reacting to them, however, I am not keeping up to date with what is going on in the community and my ability to help you is becoming very limited - I no longer remember some things, I don't have tools installed anymore, and I don't know what is up to date nowadays.

Link to comment
Share on other sites

Right, I don't even know where to start, because everything is just totally fucked up.

First, worldserver was crashing because it tried to update the sql tables using files for 335->434 sql conversion (I've no idea why they were even present in the source). I just deleted those files and all seemed ok (except for the fact that it still updates some sql tables every time I run it)

Then, I found out that the locales_creature table is basically absent from the database. Weirdly, some npcs have names in English and some - in Russian (when I see them in game). Also, texts in books are unreadable because they appear as random letters/signs.

Now I just noticed that the item_template table only contains 207 records (I noticed that because I was going to edit an item in Truice, but it couldn't find it). Most bizzarely, the game client and worldserver.exe can still somehow access all items (lookup, add, etc.), including those not present in the item_template table.

Please, help me before I go totally insane

or not


 skarnnoggitlogpost.thumb.jpg.d752b4e8541

Link to comment
Share on other sites

Navicats not recommended I remember my friend who helped me set it up told me aswell its just not, obviously failed tool for this, and about your other problems just post there on their support if the build is even working. If it says 335 and 6x working and 434 failing in red obviously somethings not right with the build. But then again you can always theorycraft about it here and hope.. 

Quote

4.3.4 is not officially supported, but some people keep updating it (as you can see in githab)

:B

EDIT: altho https://gitlab.com/trinitycore/TrinityCore_434/tree/4.3.4#build-status its green now you should be able to set it up

Link to comment
Share on other sites

On 2/6/2017 at 10:25 PM, Смердокрыл said:

Now I just noticed that the item_template table only contains 207 records (I noticed that because I was going to edit an item in Truice, but it couldn't find it). Most bizzarely, the game client and worldserver.exe can still somehow access all items (lookup, add, etc.), including those not present in the item_template table.

That's normal. That became normal behaviour a long time ago. The server loads items from the dbcs (or db2s, I think? Can't remember which is used in Cata) called Item and Item-Sparse. It then loads additional ones that are done entirely through the database.

If you want to edit them you might be able to get away with extracting the data from item-sparse and item and combining them to fill out the item_template table. You can find details on those two DB files in WoWDev, as well as the format of the Item_Template on TrinityCore's Wiki.

[Edit]

I did a quick look at https://gitlab.com/trinitycore/TrinityCore_434/blob/4.3.4/src/server/worldserver/worldserver.conf.dist and you will want to make sure your worldserver.conf has DBC.EnforceItemAttributes disabled (set to 0). Then you would be able to proceed with replacing the data from DBCs/DB2s with data in Item_Template.

Iy6QvK4.png

Link to comment
Share on other sites

3 hours ago, Razmataz said:

That's normal. That became normal behaviour a long time ago. The server loads items from the dbcs (or db2s, I think? Can't remember which is used in Cata) called Item and Item-Sparse. It then loads additional ones that are done entirely through the database.

I suspected that. Thanks very much!

or not


 skarnnoggitlogpost.thumb.jpg.d752b4e8541

Link to comment
Share on other sites

×
×
  • Create New...