Skip to content

Instantly share code, notes, and snippets.

@godcheese
Last active August 19, 2017 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save godcheese/0b77450a167dbe5a354af93c048338c4 to your computer and use it in GitHub Desktop.
Save godcheese/0b77450a167dbe5a354af93c048338c4 to your computer and use it in GitHub Desktop.
MYSQL数据库迁移脚本
chcp 65001
@REM Author:godcheese@qq.com
@REM Description:MYSQL数据库迁移脚本
@REM Platform:Windows
@echo off
set "MYSQL_HOME=D:\dev\mysql\mysql5.7.14"
set "HOST=localhost"
set "PORT=3306"
set "USER=testuser"
set "PASSWORD=testpwd"
set "DATABASE=testdb"
set "TABLES=D:\dev\testdb\tables"
set "EXEC=%MYSQL_HOME%\bin\mysql.exe -h%HOST% -P%PORT% -u%USER% -p%PASSWORD% -D%DATABASE%<%TABLES%"
%EXEC%\deleteTables.sql
%EXEC%\1_ict_logs_table.sql
echo finished.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment