Hello, please sign in or register
You are here: Home

BATCH Mysqldump useful development tool

Modifty the remote_server_address and the username and password of the following script . Save to file.bat and run.

@echo off
echo. | time /t
echo Update local database with a dump from mickey.
SET /P dbname=Name of database?: 
SET tmp_file=c:\wamp\tmp.sql
echo Copying %dbname%@DBServer to %dbname%@localhost ...
c:\wamp\mysql\bin\mysqldump.exe -h 192.168.0.1 -uusername -ppassword %dbname% > %tmp_file%
c:\wamp\mysql\bin\mysql.exe -h localhost -uroot %dbname% < %tmp_file%
echo Completed, creating the database %dbname%
echo. | time /t
pause
cls

The result is a window like this to prompt the user to type in the name of the database. Of such information could be written into the script.

Here is the result of a completed update.

 

Wamp

if your using wamp like i got the whole of my team to. For easy update Add a line to wampserver.ini, after [Menu.Left]

Type: item; Caption: "Update Local Database"; Action: run; FileName: "C:/wamp/updatedb.bat"; Glyph: 0

Comments

Arman
Created 29/05/09
Arman
Arman
Created 29/05/09
guoyanying
But the replica watches sentry reebok shoes knew abercrombie and fitch uk his
Created 07/10/15
1015maoqiuyun
coach outlet online, http://www.coachoutletonline-store.us.com/
Created 15/10/15
clibin
Tyrion 5c cases watched her ray ban sunglasses read. His timber...
Created 18/04/16
chenyan
Bond grinned. pandora-bracciali.it "We bcbgmax.in.net only chaussure...
Created 15/06/16
leilei3915
20170408 leilei3915 kate spade outlet coach facto...
Created 08/04/17
wanglili
michael kors outlet polo outlet long...
Created 21/08/17
meadc
Oakley Sunglasses hermes belt
Created 09/09/17
Title*
Comment

Prove you are not a robot

To prove you are not a robot, please type in the six character code you see in the picture below
Security confirmation codeI can't see this!
Contact
Name*
Email never shown*
Home Page

Author

Andrew Dodson
Since:Feb 2007

Comment | flag

Categories

Bookmark and Share