从 5.5 升级到 5.7 后,mysql 在访问数据库时崩溃

从 5.5 升级到 5.7 后,mysql 在访问数据库时崩溃

将 mysql 从 5.5 升级到 5.7 后,其中一个 innodb 数据库似乎已损坏。

mysqldump -u root -p mydatabase > mydatabase.sql Enter password:
mysqldump: Error: 'Lost connection to MySQL server during query' when trying to dump tablespaces
mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'ndbinfo\_version'': MySQL server has gone away (2006)

mysqlcheck -u root -p mydatabase
Enter password:
mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '

mysql 日志显示此错误:

[ERROR] InnoDB: Trying to access page number 1122710 in space 154, space name mydatabase/mytable, which is outside the tablespace bounds. Byte offset 0, len 8192, i/o type read. If you get this error at mysqld startup, please check that your my.cnf matches the ibdata files that you have in the MySQL server.
[ERROR] InnoDB: Server exits.

现在,我无法转储数据库进行恢复,也无法修复数据库。我该怎么办?该数据库是压缩数据库。

答案1

你跑了吗mysql_upgrade更新软件后?

相关内容