升级到 MySQL 8:找不到与表空间关联的任何文件

升级到 MySQL 8:找不到与表空间关联的任何文件

从 MySQL 5.6 升级到 MySQL 8.0.15 后,mysql 服务启动失败,错误日志如下:

2019-04-16T11:34:52.077516Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.15) starting as process 22292
2019-04-16T11:38:20.091064Z 1 [ERROR] [MY-012179] [InnoDB] Could not find any file associated with the tablespace ID: 4294967293
2019-04-16T11:38:20.091090Z 1 [ERROR] [MY-012964] [InnoDB] Use --innodb-directories to find the tablespace files. If that fails then use --innodb-force-recovery=1 to ignore this and to permanently lose all changes to the missing tablespace(s)
2019-04-16T11:38:20.191785Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2019-04-16T11:38:20.892939Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2019-04-16T11:38:20.893192Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2019-04-16T11:38:20.893958Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-04-16T11:38:20.894726Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.15)  MySQL Community Server - GPL.

这是在 Ubuntu 18.04 上使用通常方法时发生的apt install mysql-server

现在,我的问题是:

  1. 我怎样才能找到丢失的文件?
  2. 如果找不到,我怎么知道这个表空间是什么,以及它与哪个数据库或表相关?我需要这个来衡量忽略表空间的风险。

相关内容