![mysql.proc 已损坏。我该如何修复它?](https://linux22.com/image/595752/mysql.proc%20%E5%B7%B2%E6%8D%9F%E5%9D%8F%E3%80%82%E6%88%91%E8%AF%A5%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E5%AE%83%EF%BC%9F.png)
我有一台运行 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