Heim  >  Artikel  >  Datenbank  >  MySQL导入错误----Cannot load from mysql.proc解决办法

MySQL导入错误----Cannot load from mysql.proc解决办法

WBOY
WBOYOriginal
2016-06-07 17:33:511048Durchsuche

Linux下将mysql从5.1升级至5.5后,发现存储过程不能用了。创建和使用存储过程时就会提示Cannot load from mysql.proc. The table is probab

Linux下将mysql从5.1升级至5.5后,发现存储过程不能用了。创建和使用存储过程时就会提示Cannot load from mysql.proc. The table is probably corrupted。

查遍整个百度,结果还是印证了那一句话“天下文章一大抄”啊!

所有的文章几乎都是这么说的

解决方法非常简单,,运行mysql_upgrade命令即可。此命令会在数据目录下生成一个文本文件mysql_upgrade_info,里面的内容为升级后的数据库版本。

但不知道什么原因,在我这里无效,升级后各种升级OK,但仍然报这个错误。

最后还是求助GOOGLE吧

?id=50183

原因是mysql.proc升级时有个字段没有升级成功。

在5.1中mysql.proc表的comment字段是varchar(64):

`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',但在5.5中应该是text:

`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

So,执行下面的语句,把这个字段修改为text,就彻底OK了:

ALTER TABLE `proc`

MODIFY COLUMN `comment`  text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL AFTER `sql_mode`;

linux

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:MySQL的锁机制Nächster Artikel:导入数据IMP-00058 ORA-00904