我有一台运行Debian 5.0和MySQL的服务器。 突然之间,MySQL停止了工作,经过多次尝试修复它,我决定重新安装它。 我安装了MySQL 5.1.63,启动时进入安全模式。 我做了一些打字,当我以root身份执行mysql_upgrade时,它抱怨说:
... 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表,但没有成功。
您是否尝试过使用--force选项:
mysql_upgrade --force -u root -p