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:
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.
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: