mysql模式显示数据库元数据中不可用的表(信息\模式)

of1yzvn4  于 2021-06-23  发布在  Mysql
关注(0)|答案(1)|浏览(622)

我在awsrds上有一个mysql模式,其中有一个表,列在的输出中 show tables; 命令,但在使用查找表结构时引发错误 desc <tableName>; 命令。我在元数据中查询了此表的任何引用,但也找不到任何引用。
奇怪的是我们设置了mysql变量 lower_case_table_names=1 但这个特定的表是用表名中的大写名称创建的。除非我不知道有没有可能把这个设定在会议上。
显示表格的输出;

desc的输出/错误信息;

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

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' .
不确定此表在哪一点损坏,因为我在旧备份中有表结构。
如有任何帮助,请移开这张table。

tsm1rwdh

tsm1rwdh1#

解决这个问题的唯一方法是将整个模式(损坏的表除外)导出到新的模式中。

相关问题