Jump to content
  • 0

Database Error (?!)


Auntie Mangos

Question

Great ! Thank you :)

But I got another question ... I think I need to do a lot of these commands :

mysql -u root -p mangos <  12216_mangos_01_mangos_creature_loot.sql 

How can I execute the SQL Queries all at once ?

Via python scripts etc.. You can prolly find it on the old forum.

http://getmangos.eu/community/viewtopic.php?id=15590 now, how sad isnt it that paste2 removed his script there? It was really nice, so if someone happens to have it somewhere i would be interested in having it too :)

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

Hi Guys,

I tried to run Mangos on a Debian x86 VM. The compiling works well, but I think I broke the database right now.

I always get a message like this :

[A] You have: --> '12195_02_mangos_mangos_string.sql'

[A] You need: --> '12300_01_mangos_mangos_string.sql'

I am very new at Linux and Mangos so excuce if it's a obvious mistake.

P.S. And Sorry for my English ;D

Link to comment
Share on other sites

Say your Mangos Source is in home/mangos/server (Which I'm assuming it is if you're a newbie following a guide. :) )

cd /mangos/server/sql/update
mysql -u root -p mangos <  12216_mangos_01_mangos_creature_loot.sql 

Repeat for additional updates. :)

A little extra clarification

You're telling the terminal that it's a mysql command -u root means that you're using username root -p is going to have you input a password afterwards; the mangos after the -p says it's going to the mangos database then the < tells the terminal that your next input is going to be the SQL file that you actually want executed.

Sorry if it's not that clear; not used to helping out on Debian lol

Link to comment
Share on other sites

Something I'll work on; in the meantime I'd recommend taking all the SQL Scripts you need and copying them into one folder. Now open Gedit (Or Whatever you use)

Save as update.sh

Content:

DBUSER="mangos"
PASS="mangos"
DB="mangos"

for f; $do
mysql -u $DBUSER -p$PASS $DB <$f
done

Now navigate to your folder with the scripts and shell folder and then type

sh update.sh

Now Just Let it update. Not a pretty fix, but it should work in the meantime for an easy update system.

Link to comment
Share on other sites

Archived

This topic is now archived and is 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