@echo off
@set db= authplat_public
@set ip= localhost
@set port= 3306
@set userName=authplat_public
@set password=kefXZQOe1wXjNcTc
@set msgLog=msgLog.log
@set errLog=errLog.log
for /r E:/sql %%i in (*.sql) do (
echo excute %%i start>>%msgLog%
echo excute %%i start>>%errLog%
echo.>>%errLog%
mysql -f -h%ip% -P%port% -u%userName% --password=%password% %db% < %%i --default-character-set=UTF8 1>>%msgLog% 2>>%errLog%
echo excute %%i end>>%msgLog%
echo.>>%errLog%
echo excute %%i end>>%errLog%
)
echo SQL excute end>>%msgLog%
pause

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code