0

After upgrading mysql from 5.5 to 5.7, one of innodb databases seems corrupted.

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 ... '

The mysql log shows this error:

[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.

Now, I cannot dump the database for recovery nor repair the database. How can I do? The database is a compressed one.

peter
  • 93
  • 13

1 Answers1

0

Did you run mysql_upgrade after you updated the software?

Raffael Luthiger
  • 2,001
  • 2
  • 17
  • 26
  • yes, I ran mysql_upgrade but the last message of this command is: "Error during call to mysql_check", and the error in mysql log is the same. – peter Jul 12 '22 at 09:13