AWS RDS上的Mysql模式显示表,该表在数据库元数据(information_schema)中不可用

问题描述 投票:2回答:1

我在AWS RDS上具有MySQL模式,其中有一个表,该表在show tables;命令的输出中列出,但是使用desc <tableName>;命令查看表结构时会引发错误。我已经查询了该表的所有引用的元数据,也找不到。

奇怪的是,我们已经设置了mysql变量lower_case_table_names=1,但是这个特定的表是用表名中的大写名称创建的。除非可以在我不知道的会话上进行设置。

显示表的输出;

Output of show tables; command

desc的输出/错误消息;

enter image description here

以下查询元数据中表名的命令将返回零结果。

select * from information_schema.COLUMNS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.COLUMN_PRIVILEGES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.FILES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.KEY_COLUMN_USAGE where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.KEY_COLUMN_USAGE where REFERENCED_TABLE_NAME like '%tempPartInfo%';
select * from information_schema.PARTITIONS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.REFERENTIAL_CONSTRAINTS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.REFERENTIAL_CONSTRAINTS where REFERENCED_TABLE_NAME like '%tempPartInfo%';
select * from information_schema.STATISTICS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.TABLES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.TABLE_CONSTRAINTS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.TABLE_PRIVILEGES where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.VIEWS where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.INNODB_CMP_PER_INDEX where table_name like '%tempPartInfo%';
select * from information_schema.INNODB_BUFFER_PAGE_LRU where TABLE_NAME like '%tempPartInfo%';
select * from information_schema.INNODB_CMP_PER_INDEX_RESET where table_name like '%tempPartInfo%';
select * from information_schema.INNODB_BUFFER_PAGE where TABLE_NAME like '%tempPartInfo%';

目前,任何转储整个模式的尝试都在此表上失败。并且任何删除该表的尝试也会失败,并显示相同的错误消息SQL Error (1051): Unknown table 'v*******r.temppartinfo'

由于我在较早的备份中具有表结构,因此不确定该表在何时被损坏。

感谢您对删除此表的任何帮助。

mysql amazon-web-services information-schema
1个回答
0
投票

我找到解决此问题的唯一方法是将除损坏的表以外的整个架构导出到新架构中。

© www.soinside.com 2019 - 2024. All rights reserved.