Exec bat Test~

.bat file:

set MySQL_HOME=C:\Program Files\MySQL\MySQL Server 6.0
set PATH=%MySQL_HOME%\bin;%PATH%
mysql --host=192.168.0.196 --port=3308 --user=scott --password=tiger --default-character-set=utf8 run<mysql.sql
pause

mysql.sql:

call Test_SP();
INSERT INTO `run`.`mylog`
(log_datetime,log_thread,log_level,log_logger,log_message)
VALUES
(
now(),100,'Operate','Exec temp table to Target table..','Manu'
);
Note:.bat and .sql should be in the same path with mysql.exe,for example:C:\Program Files\MySQL\MySQL Server 6.0\bin.

你可能感兴趣的:(test)