@echooff
::调用数据入库sql脚本
sethour=%time:~0,2%if"%time:~0,1%"==" "sethour=0%time:~1,1%set now=%Date:~0,4%%Date:~5,2%%Date:~8,2%%hour%%Time:~3,2%%Time:~6,2%
echo %now%
::数据库地址
set host=localhost
::数据库端口
set port=3306
::数据库账号
setuser=root
::数据库密码
set pass=root
::数据库库名
set dbname=datademo
::数据库表名
set tbname=zb_info
::要触发的sql文件名
set sqlname=zb_info.sql
mysql -h%host%-P%port%-u%user%-p%pass%<%sqlname%@echoon