Created
June 29, 2018 19:25
-
-
Save howellcc/50f5226f39793ce0d351ce54a2c0c648 to your computer and use it in GitHub Desktop.
Batch script for clearing and reloading test data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM This file relies on the existence of C:\my.ini with the following contents | |
REM [client] | |
REM user=[username] | |
REM password=[password] | |
REM Ask user for dbname | |
SET /p dbname="Database Name: " | |
REM drop and recreate database | |
mysql -e "drop database %dbname%;" | |
mysql -e "create database %dbname%;" | |
REM Load the database from previous dump | |
mysql %dbname% < C:\Users\chowell\Documents\RentManager\DatabaseScripts\0template.sql | |
REM Apply my modifications | |
mysql %dbname% < C:\Users\chowell\Documents\RentManager\DatabaseScripts\0mymods.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment