首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >辅助索引表损坏?

辅助索引表损坏?
EN

Database Administration用户
提问于 2021-06-30 23:48:46
回答 1查看 52关注 0票数 0

Mysql错误日志始终抛出如下所示的错误:

代码语言:javascript
运行
复制
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

文件是存在的

代码语言:javascript
运行
复制
# 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

因此,我认为索引或表空间都已损坏。怎么修呢?

EN

回答 1

Database Administration用户

回答已采纳

发布于 2021-07-30 01:42:40

那么,这个问题已经解决了,在删除了所有相关的表格之后。

首先,查阅资料图式,找出有关资料:

代码语言:javascript
运行
复制
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相关:

代码语言:javascript
运行
复制
select * from information_schema.statistics where table_schema='DB_NAME' and index_type='FULLTEXT';

最后,删除索引:

代码语言:javascript
运行
复制
alter table DB_NAME.TABLE_NAME drop index '_keywords';

如果要重新创建索引:

代码语言:javascript
运行
复制
create fulltext index _keywords on DB_NAME.TABLE_NAME(KEY1,KEY2...);

通过对表进行desc处理,可以找到密钥名。

票数 0
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/295086

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档