Jump to content

MySQL AutoUpdate DB - PHP Script


Recommended Posts



today I tried update my mangos database but there was a lot of sql files. I found a python script ut it not works

Traceback (most recent call last): File "C:\\MangosGIT\\mangos\\sql\\updates\\updater.py", line 59, in <module> data, errors = subprocess.Popen(query, stdout = subprocess.PIPE).communicate() File "C:\\Python27\\lib\\subprocess.py", line 679, in __init__ errread, errwrite) File "C:\\Python27\\lib\\subprocess.py", line 893, in _execute_child startupinfo) WindowsError: [Error 2] A rendszer nem találja a megadott fájlt >>>

So I opened the readme file in updates and I understood the meaning of the updates name.

So i made this simple PHP script to make less work with update.


- Automatically applies updates from every sql file

- If there are any problem for example: "Failed: Table 'mangosd.creature_respawn' doesn't exist." (this error is because the creature spawn database table is not exist in mangosd database). You will see this message ing quotes as status of update.

- Updates that are successfully applied You will see status message "Success" and this sql files are moved into folder: success

- There are some updates like "ALTER TABLE db_version CHANGE COLUMN required_11754_mangos_mangos_string required_11755_01_mangos bit;" these files will be skipped and you need to apply this sql file/files manually. Dont worry these files is moved into TryManually directory.

My mysql server is on my PC so i am not sure it works remotely.

Download: http://www11.zippyshare.com/v/82467475/file.html

How To Use:

VirusTotal: http://www.virustotal.com/file-scan/report.html?id=745fb7a2abe7545025ea83e288a13363c10eeda988e0ce1bdf1a806c4a9044da-1314997413

this works while name of update is correct because it is base on it:


| | | |

| | | |

| | | The table `spell_chain`

| | | will need an update.

| | |

| | Name of affected DB (default recommended name)

| | Can be: characters, mangos, realmd

| |

| Counter show number of sql updates in updates list for provided revision

| and set proper order for sql updates for same revision


MaNGOS commit revision related to sql update.

It included in commit description in form [6936] as you can see at http://github.com/mangos/mangos/commits/master

Link to comment
Share on other sites


  • 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