Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Mangos Few MySQL Tricks To Make Life Easier

Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
Hate updating your database with those 1000+ updates?
Hate when your database stalls at like 70 executed queries?

Look no further, here's some tricks to make your life easier.

Executing Batch (Multiple) Updates:
Copy all the updates you need to execute and browse to C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version is there). Create a new text file, then copy and paste the following script:

Code:
@ECHO OFF

FOR %%X IN (*.sql) DO mysql -h localhost -u root -pPASSWORD DATABASE < %%X

Replace "PASSWORD" with your MySQL password (Default is root) and "DATABASE" with the database you need to execute the files into. Run it. There 'ya go. It'll run all the .SQL files in ...\bin\.

Executing Large Files:
Copy the SQL file you need to execute to C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version is there). Press Win+R to open Command Prompt. Type CD C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version is there) then type mysql -h localhost -u root -pPASSWORD DATABASE < SQLFile.SQL (Replace PASSWORD with your DB password (Default: root), DATABASE with the database you need to execute and SQLFile.SQL with the name of the SQL file you need to execute).

The above trick actually executes files much quicker than any SQL manager program I've used.
 
Last edited:
Back
Top