0

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                             |
+-------------------------------------+
7
  • 1
    Show the output for SHOW TABLES FROM cacti;.
    – Akina
    Commented Oct 11, 2023 at 16:14
  • Does Workbench have permission to access cacti?
    – Rick James
    Commented Oct 11, 2023 at 16:28
  • @Akina data is provided in the question now. Rick James, workbench was used just to delete. All queries above are executed from cli by root.
    – Marek
    Commented Oct 12, 2023 at 10:11
  • SHOW TABLES reports that there is no such table. Try to create fake table with this name then drop it..
    – Akina
    Commented Oct 12, 2023 at 10:24
  • @Akina I tried this before. I got "ERROR 1050 (42S01): Table 'cacti.data_debug' already exists".
    – Marek
    Commented Oct 12, 2023 at 14:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.