Mysql错误日志始终抛出如下所示的错误:
2021-06-30T23:29:32.795948Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_00000000000030de_INDEX_1` in the cache. Attempting to load the tablespace with space id 5161
2021-06-30T23:29:32.798119Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_00000000000030de_INDEX_2` in the cache. Attempting to load the tablespace with space id 5162
2021-06-30T23:29:32.799672Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_00000000000030de_INDEX_3` in the cache. Attempting to load the tablespace with space id 5163
2021-06-30T23:29:32.801289Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_00000000000030de_INDEX_4` in the cache. Attempting to load the tablespace with space id 5164
2021-06-30T23:29:32.802702Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_00000000000030de_INDEX_5` in the cache. Attempting to load the tablespace with space id 5165
2021-06-30T23:29:32.804163Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_00000000000030de_INDEX_6` in the cache. Attempting to load the tablespace with space id 5166
2021-06-30T23:29:32.805517Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_BEING_DELETED` in the cache. Attempting to load the tablespace with space id 5156
2021-06-30T23:29:32.807103Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_BEING_DELETED_CACHE` in the cache. Attempting to load the tablespace with space id 5157
2021-06-30T23:29:32.808975Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_CONFIG` in the cache. Attempting to load the tablespace with space id 5158
2021-06-30T23:29:32.810041Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_DELETED` in the cache. Attempting to load the tablespace with space id 5159
2021-06-30T23:29:32.811121Z 3018 [ERROR] InnoDB: Failed to find tablespace for table `my_db`.`FTS_00000000000022f5_DELETED_CACHE` in the cache. Attempting to load the tablespace with space id 5160文件是存在的
# ll FTS*
-rwxr-xr-x. 1 mysql mysql 13631488 Nov 9 2018 FTS_00000000000022f5_00000000000030de_INDEX_1.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_00000000000030de_INDEX_2.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_00000000000030de_INDEX_3.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_00000000000030de_INDEX_4.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_00000000000030de_INDEX_5.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_00000000000030de_INDEX_6.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_BEING_DELETED_CACHE.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_BEING_DELETED.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Nov 9 2018 FTS_00000000000022f5_CONFIG.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_DELETED_CACHE.ibd
-rwxr-xr-x. 1 mysql mysql 98304 Oct 19 2018 FTS_00000000000022f5_DELETED.ibd因此,我认为索引或表空间都已损坏。怎么修呢?
发布于 2021-07-30 01:42:40
那么,这个问题已经解决了,在删除了所有相关的表格之后。
首先,查阅资料图式,找出有关资料:
SELECT table_id, name, space from INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'f0Gno';
SELECT * from INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name LIKE 'DB_NAME/%';然后,您将发现它与FULLINDEX相关:
select * from information_schema.statistics where table_schema='DB_NAME' and index_type='FULLTEXT';最后,删除索引:
alter table DB_NAME.TABLE_NAME drop index '_keywords';如果要重新创建索引:
create fulltext index _keywords on DB_NAME.TABLE_NAME(KEY1,KEY2...);通过对表进行desc处理,可以找到密钥名。
https://dba.stackexchange.com/questions/295086
复制相似问题