Jump to content

[Tutorial] Updating Database/SQL Patches


Recommended Posts

  • 41 years later...

Hello, i gonna show you how to update the database with a little application that i found on the wiki: Compiling MangOS On Ubuntu, But the problem is, it doesn't explain it right, and doesn't have a download link. The problem of updating is there are a lot of SQL patches, and one per one is very hard and bored.. Also, read:

AUTOR: redigaffi

PYTHON SCRIPT CREATOR: Not me, anyone in the wiki.

DIFFICULTY: Easy - Normal

FIRST STEEP

- All what you need is to have python installed on your server, also i gonna show you how to install it in both platforms:

Windows:

Go to http://www.python.org/download/ and select the most recent release, download & install.

LINUX:

Open Console and copy: (Code by ubuntuForums)

sudo apt-get update&&sudo apt-get install python-gtk2 python-glade2

SECOND STEEP

- Download the file and put it in:

<MANGOS_SOURCEFILE_DIR>/sql/updates/

THIRD STEEP

Executing the file.

WINDOWS:

Only execute the update.py file, windows will recognize it!

LINUX:

Use this command line:

python update.py

DOWLOADS:

NOTE: This is only for users who has default database acces, also i mean the user of database mangos and password mangos, if you have another details you can give me the details and i edit it for you.

SOURCE CODE:

#!/usr/bin/env python
import glob, os
patches = glob.glob('*.sql')
patches = sorted(patches)

for x in patches:
 db = x.split("_")[2].replace('.sql', '')
 os.system("mysql -u mangos -pmangos -v " + db + " < " + x)

Thank you all for watching, my first tutorial helping in getmangos, i received a lot of help to of all users, also thank you. I hope this is useful

Link to comment
Share on other sites

Thanks for the tutorial!Unfortunately, it does not seem to be working. I got this error:

ERROR 1054 (42S22) at line 1: Unknown column 'data' in 'field list'
ERROR 1049 (42000): Unknown database 'corpse'
Traceback (most recent call last):
 File "./updatescript.py", line 7, in <module>
   db = x.split("_")[2].replace('.sql', '')
IndexError: list index out of range

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use