mysql.proc 已损坏。我该如何修复它?

mysql.proc 已损坏。我该如何修复它?

我有一台运行 Debian 5.0 和 MySQL 的服务器。突然,MySQL 停止工作,经过多次尝试修复后,我决定重新安装它。我安装了 MySQL 5.1.63,启动时进入安全模式。我输入了一些内容,当我mysql_upgrade以 root 身份执行时,它抱怨道:

...
Running 'mysql_fix_privilege_tables'...
ERROR 1548 (HY000) at line 1111: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1064 (42000) at line 1112: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sqlstate 'HY000' set message_text='Unexpected content found in the performance_s' at line 1
ERROR 1548 (HY000) at line 1125: Cannot load from mysql.proc. The table is probably corrupted
FATAL ERROR: Upgrade failed

我检查了mysql.proc表格,它的comment列与我的备份略有不同。

-- My backup says:
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
-- But it were:
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,

因此,我恢复了我的 mysql 数据库备份,现在它们全部匹配, mysql_upgrade仍然会触发相同的错误。我还尝试检查并修复mysql.proc表,但没有成功。

答案1

您是否尝试过使用以下--force选项:

mysql_upgrade --force -u root -p

相关内容