@echo off
rem 这段代码的作用是对mysql进行查询操作,并将查询结果写入到result.txt文件中
echo %TIME%
set errorlevel=0
set path_bin_mysql="D:\Program Files\mysql_1\bin\mysql"
set host=localhost
set port=3308
set database_mysql=mysql
set user_mysql=root
set password_mysql=admin
%path_bin_mysql% -u%user_mysql% -p%password_mysql% -h%host% -P%port% %database_mysql%< test.sql >
result.txt
pause