Mysql报错 Cannot load from mysql.proc

Auth: Jin

Date: 20140716

 

mysql --default-character-set utf8 -h127.0.0.1 -uroot -p < account-20140716-1.sql
ERROR 1548 (HY000) at line 57: Cannot load from mysql.proc. The table is probably corrupted
mysql> SHOW PROCEDURE status;
ERROR 1548 (HY000): Cannot load from mysql.proc. The table is probably corrupted
mysql_upgrade -u root -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
Running 'mysqlcheck with default connection arguments

# mysql --default-character-set utf8 -h127.0.0.1 -uroot -p < account-20140716-1.sql
正常了

据说原因是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`;

转载于:https://www.cnblogs.com/diege/p/3849455.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值