我知道它看起来像是重复的,但我找到的解决方案对我不起作用。我卸载了SQL5.1并安装了5.6,我想重新导入之前导出的MySQL文件。但是有一些函数会在导出文件中导致错误。我找到并运行了这个命令:
../bin mysql mysql_upgrade -uroot -p --force但如果我理解的话,它只在升级时有效,而不是在安装时起作用。对我有什么解决方案吗?
我还从导入文件中删除了函数定义,并完成了导入。但是,如果我想手动重新定义该函数,它会显示相同的错误"can not load from mysql.proc“。函数如下:
DELIMITER $$
CREATE FUNCTION `randStr250`(length int) RETURNS varchar(250) CHARSET utf8
begin
declare s varchar(250);
declare i tinyint;
set s="";
if (length<1 or length>6) then
set s="Parameter should be in range 1-6. Your value was out of this range.";
else
set i=0;
while i<length do
set s=concat(s,sha1(now()));
set i=i+1;
end while;
end if;
return s;
end $$
DELIMITER ;https://stackoverflow.com/questions/27918764
复制相似问题