简体   繁体   English

执行批处理文件Mysql时出现问题

[英]Problem executing batch file Mysql

I' experiencing problems while trying to run a batch file within Mysql shell. 尝试在Mysql Shell中运行批处理文件时遇到问题。

I wrote a stored procedure : 我写了一个存储过程:

DELIMITER $$

DROP PROCEDURE IF EXISTS creaFornitori_prova$$
CREATE PROCEDURE creaFornitori_prova ()
BEGIN
create table Fornitori_prova (id_For mediumint(5) NOT NULL auto_increment,
nome_For varchar(50) NOT NULL,
ind_For varchar(50) NOT NULL,
PRIMARY KEY  (id_For)
) ENGINE=InnoDB;
END$$

DELIMITER ;

I called the file : st_F.sql 我将文件命名为:st_F.sql

Whenever I try to execute the file through the command : source st_F.sql; 每当我尝试通过以下命令执行文件时: source st_F.sql;

I get this error: 我收到此错误:

ERROR: Failed to open file 'st_F.sql', error: 2 错误:无法打开文件“ st_F.sql”,错误:2

I get the same error when I use \\. st_Fornitori.sql; 使用\\. st_Fornitori.sql;时出现相同的错误\\. st_Fornitori.sql; \\. st_Fornitori.sql;

Thanks Mauro 谢谢毛罗

source DRIVE:ABSOLUTE_PATH_TO/st_F.sql;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM