DJRavine's Codebook:

Post Reply 
Thread Rating:
  • 1 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[MaNGOS] Upgrade to Latest Revision
02-20-2007, 03:53 AM
Post: #1
[MaNGOS] Upgrade to Latest Revision
NOTE: Although this is meant for windows, it should help every user to understand how the server update process works.

The objective of this guide is to teach you how to update your mangos server. Mangos is a server software that can be customized through the use of different MySQL databases witch contain information about the server, quests, character info etc.
So whenever major changes are made to the mangos program, this database (short: “DB” from now on) also needs updates so it “fits” the new changes and additions made to the server.
That’s why this guide is divided in two parts:
• Updating the Mangos Server: The use of a new software version
• Updating the DB: Making your DB compatible to the new mangos version so you can keep your data (chars, quests, items, whatever you and players saved)

Updating the Mangos Server

Step 1 - Download the latest Version
Shouldn't be a problem, just simply search for it in the "Installation and Configuration" section of the forum.
For normal windows users this should be right:
Compiled Mangos Win32 Binaries

Search for the release with the greatest revision number (something equal or greater than 3064 at the time I wrote created this) and download it.
(There are lots of different releases with different extras. Choose the one that suits you best)

Step 2 - Extract the new Files
Now extract all new files of the revision you just downloaded to your Mangos Server directory ("C:\MANGOS" or something)

Most times you can continue using your old configuration files (mangosd.conf and realmd.conf) but I like to reconfigure them and take the time to do some little changes. (Weather, save times etc)
Remember, MOST TIMES, not always, so check the file for changes since from time to time new thing are added.
Other files can be overwritten (or overwrite all of them but reconfigure the 2 .conf files)

Now you are using all latest files for running the server.
But you may have noticed that there are also some new .sql files in the package (in a folder named "sql")
As mangos "evolves" features are changed or added, this changes sometimes also change the way the DB should "look" and "work". When this happens, you also have to update your database. That’s what these little .sql files do. They scripts meant for changing your outdated DB to the format compatible to your new Mangos Server.
You will have some SQL software installed for managing your MySQL server since you needed this software to install mangos the first time. You also know how to execute .sql files to apply changes to your database since you already did this before. Most users use SQLyog. It is good for huge files but for updating little .sql files I recommend MDH (mangos database handler) but it makes no difference, it is only faster with little files.
But how to and witch of these files do you need? That’s our next step

Updating the DB

When updating your database, you may lose all data in it (characters and so on) so I recommend you to backup your accounts, characters etc using MDH (mangos database handler) to and then using it after the update process to restore all data. (there are other ways to backup, but this is the easiest one)

Go to the "sql" subdirectory found in the dir you extracted the new mangos version.
There you will find some .sql files. Import all of them but NOT these:
• create_mysql.sql
• drop_mysql.sql
• mangos.sql
• realmd.sql
This is the normal method, you can also choose to not import any of these .sql files but they are needed to activate some things like npc spells, jails, or whatever (depends on the mangos version you downloaded). The four file I told you not to import are only neede when you want to build a blank world.

Now, if you plan on using some custom database or a blank world go to Method A. If you want to use the SDB (silver database) go to Method B.

[Method A – Default blank database]
Quote:Open the "sql/updates" folder and import ONLY those .sql files that have a greater revision number then you last mangos.
-You download mangos revision 2765 and use it for a while.
-After that you update your mangos revision to the 2779 revision
-these 2 .sql files from the updates folder:
• 2765_auctionHouse.sql
• 2765_mail.sql
WON’T be needed to update since they're change is already in your "2765 compatible database"
-But this file:
• 2778_command.sql
WILL be needed since it has a Database fix for a new change implemented in revision 2778, so this change is needed in 2779, that came later, and was not yet implemented in revision 2765.

If you DO use a custom database (like SDB) and wish to update mangos+database:

[Method B – Silver DB]
Quote:Download all custom database updates released between your last mangos revision and your new one.
If you are updating from "mangos-2765" to "mangos-2779" and your last custom database was "DB for mangos 2765"
Then now you will download all new custom database releases that came after "DB for mangos 2765" until you find one that matches your new "mangos-2779"
This would be something like:
"DB for mangos 2766"
"DB for mangos 2767"
"DB for mangos 2770"
...........all files until...........
"DB for mangos 2779"
(doesn’t need to have all numbers, but be sure to download all files)
Then import all .sql DB updates found in this files into your "mangos" database. Remember to have all version 2765 data still in the database when you are importing these updates so they are also updates to the newest version.

BUT OFTEN you don't find a custom database that was made exactly for the latest mangos you just downloaded.
the "DB for mangos 2779" may not be there, only a
"DB for mangos 2775" and a
"DB for mangos 2782"
None of these matches your "mangos-2779"
So you would use the nearest one to the revision number you want use (but not any DB made for newer mangos releases)
In this case this would be "DB for mangos 2775" since 2782 is newer then your Mangos server software.
"But this database is 2775 and not 2779!!!"
Don't worry! We will now update this “to old” database to the same version your mangos server is so that they are 100% compatible.

There is a subfolder in the sql folder named "updates"
This folder contains a huge number of fixes for databases that aren't up to date with the mangos version they are supposed to work with.
-You downloaded mangos revision 2765 and a "2765 compatible" database file and use it for a while.
-After that you updated your mangos revision to the mangos-2779 release but use the same database.
-Now your database is 2765 and your mangos is already 2779! This can't work fine!
"How can I update the database from 2765 to 2779 with the .sql files?"
-Just import the .sql files that came after your revision (if none came, there where no changes in DB)
-So in this case, these 2 .sql files found in the "/updates/sql" folder:
• 2765_auctionHouse.sql
• 2765_mail.sql
Won’t be needed to update since they're change is already in your "2765 compatible database"

-But this file found in the "/sql/updates":
• 2778_command.sql
Will be needed since it has a Database fix for a new change implemented in revision 2778

That’s it, update complete...


[Image: DJRavine_userbar.gif]
[Image: djr_sig.png]
[Image: thedjravine.png]
"In a world of genocide... The pacifist must take control..." - DJRavine
Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
02-20-2007, 06:21 AM
Post: #2
[MaNGOS] Upgrade to Latest Revision
Nice guide, should clarify alot for people new to updating thier serverSmile

Death awaits you..
[Image: sigug3.jpg]
[Image: wowps_admin.gif]
Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
02-25-2007, 07:16 AM
Post: #3
[MaNGOS] Upgrade to Latest Revision
g00d guide Smile

I am a dyslexic Smile smilieSmile spammer!(I really am dyslexic so please excuse me when i type letters in words backwards)
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 

Share/Bookmark (Show All)
Facebook Linkedin Technorati Twitter Digg MySpace Delicious

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [MaNGOS] Linux Install / Compile Guide DJRavine 21 26,753 04-03-2010 10:35 PM
Last Post: robertmaverick
  make a portal for mangos Jakey 8 4,325 12-21-2009 07:53 AM
Last Post: rothmans92
  [MaNGOS] LAN + INTERNET Router Setup DJRavine 67 28,185 03-01-2009 03:08 AM
Last Post: DJRavine
  [MaNGOS] Complete Installation Guide DJRavine 32 31,783 09-26-2008 07:59 AM
Last Post: Jakey
  [MaNGOS] Source Code Documentation DJRavine 1 6,315 06-17-2007 11:53 AM
Last Post: DJRavine
  [MANGOS] Set up your Mangos Server 2.0.8 TBC with EasyPHP Hakuji 29 11,303 06-17-2007 11:19 AM
Last Post: Ryu
  Guide to setting up a Mangos server. Ryu 11 18,805 06-17-2007 11:00 AM
Last Post: Ryu
  PDF Setup Guide for TBC MaNGOS DJRavine 1 5,731 04-03-2007 01:37 AM
Last Post: DJRavine

Forum Jump:

Contact Us | | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication | CSS Validated!