我从mariadb迁移到mysql(有效)。现在我想将mysql升级到5.7,但是它抛出了一个错误:
Running queries to upgrade MySQL server.
mysql_upgrade: (non fatal) [ERROR] 1728: Cannot load from mysql.proc. The table is probably corrupted
mysql_upgrade: (non fatal) [ERROR] 1545: Failed to open mysql.event
mysql_upgrade: [ERROR] 1072: Key column 'Id' doesn't exist in table
mysql_upgrade failed with exit status 5
我想运行mysqlcheck,但抛出错误:
Your password has expired. To log in you must change it using a client that supports expired passwords.
当我以root用户身份登录并想要设置密码时,出现此错误
Column count of mysql.user is wrong. Expected 45, found 46.
当我想通过忽略授予表来启动mysql时
mysqld --skip-grant-tables
它无声地失败。
我还能在这里尝试什么?重新安装mysql结果相同
Key column 'Id' doesn't exist in table
installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
错误。
编辑:我向my.cnf添加了skip-grant-tables并发出:
ALTER TABLE mysql.user DROP COLUMN is_role;
删除了多余的列。现在,我可以再次更新密码了。剩下的问题如下。 Apt卡在未配置的程序包上。如果apt要配置它们,则发出mysql_upgrade,它将失败,并且“表中不存在键列'Id'”。它不提供任何其他信息。我该如何调试?
遵循MySQL文档:
https://dev.mysql.com/doc/refman/5.7/en/mysql-upgrade.html
每次升级MySQL时,都应执行mysql_upgrade,它会查找与已升级的MySQL服务器不兼容的问题