Sample Header Ad - 728x90

Remove not existing table from MySQL INFORMATION_SCHEMA

0 votes
0 answers
507 views
I removed (dropped) not used (in fact it was corrupted and that's why not used) table from a MySQL DB. I did it from MySQL Workbench. It was removed and it's not existing here. mysql> SELECT * FROM cacti.data_debug; ERROR 1146 (42S02): Table 'cacti.data_debug' doesn't exist BUT if I query INFORMATION_SCHEMA, I get this: mysql> SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name = 'cacti/data_debug'; +----------+------------------+------+--------+-------+-------------+------------+---------------+------------+ | TABLE_ID | NAME | FLAG | N_COLS | SPACE | FILE_FORMAT | ROW_FORMAT | ZIP_PAGE_SIZE | SPACE_TYPE | +----------+------------------+------+--------+-------+-------------+------------+---------------+------------+ | 79055 | cacti/data_debug | 33 | 10 | 6305 | Barracuda | Dynamic | 0 | Single | +----------+------------------+------+--------+-------+-------------+------------+---------------+------------+ I found out that we can only read from INFORMATION_SCHEMA. It's just a list/snapshot of the existing data. I'd like to remove this single "row" as I'm moving to MySQL 8.0 and don't want to drag the mess. On top , Upgrade Checker is complaining about this as Error. How can I make it refreshed/regenerated? Update 1: mysql> SHOW TABLES FROM cacti; +-------------------------------------+ | Tables_in_cacti | +-------------------------------------+ | aggregate_graph_templates | | aggregate_graph_templates_graph | | ... | | color_templates | | colors | | data_input | | data_input_data | | data_input_fields | | data_local | | data_source_profiles | | data_source_profiles_cf | | ... | | version | +-------------------------------------+
Asked by Marek (13 rep)
Oct 11, 2023, 11:11 AM
Last activity: Oct 12, 2023, 10:10 AM