Skip to content

Instantly share code, notes, and snippets.

@godcheese
Last active August 19, 2017 07:49
Embed
What would you like to do?
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