![升级到 MySQL 8:找不到与表空间关联的任何文件](https://linux22.com/image/1588508/%E5%8D%87%E7%BA%A7%E5%88%B0%20MySQL%208%EF%BC%9A%E6%89%BE%E4%B8%8D%E5%88%B0%E4%B8%8E%E8%A1%A8%E7%A9%BA%E9%97%B4%E5%85%B3%E8%81%94%E7%9A%84%E4%BB%BB%E4%BD%95%E6%96%87%E4%BB%B6.png)
从 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
。
现在,我的问题是:
- 我怎样才能找到丢失的文件?
- 如果找不到,我怎么知道这个表空间是什么,以及它与哪个数据库或表相关?我需要这个来衡量忽略表空间的风险。