Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
927 views
in Technique[技术] by (71.8m points)

import - Cannot load from mysql.proc. The table is probably corrupted

I know that it looks like duplicate, but the solutions which I found doesnt work for me. I uninstalled mysql 5.1 and installed 5.6 and I would like to import previouse export sql file back. But there is some function which makes this error in that export file. I found and run command:
../bin mysql mysql_upgrade -uroot -p --force but if I understant, it works only when upgrade, not with install. Is there some solution for me?

Thanks!

EDIT: I removed the function definition from import file and import is done. But if I want to redefine that function manually it shows me the same error "can not load from mysql.proc". Function is here:

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 ;
question from:https://stackoverflow.com/questions/27918764/cannot-load-from-mysql-proc-the-table-is-probably-corrupted

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Had a similar issue after restorting a db dump from mysql-5.5.29 to mariadb-5.5.41. mysql_upgrade fixed the issue

$ mysql_upgrade -u root -pxxx 

According to the mysql manual,

You should execute mysql_upgrade each time you upgrade MySQL.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...