Why can’t I permanently delete phantom MySQL tables in phpMyAdmin after a MySQL crash (XAMPP / InnoDB)?

After a MySQL crash in XAMPP, I’m encountering a persistent issue where certain tables in phpMyAdmin reappear after being deleted. These “ghost tables” cause conflicts when I attempt to re-import a SQL dump of my database.

  • MySQL wouldn’t start in XAMPP (MySQL shut down unexpectedly).
  • I recovered it using innodb_force_recovery in my.ini, and was able to start MySQL.
  • However, I began getting this error in phpMyAdmin: #1932 - Table 'test.table_name' doesn't exist in engine
  • I gave up trying to recover the corrupted tablespace and decided to restore the database from a recent SQL dump instead.

What I have tried so far.

  • Deleted all old table files.
    I deleted all .ibd and .frm files from:
    C:xamppreinstallationmysqldatatest

  • Ran SQL dump to restore the database
    This gave the error: #1050 - Table 'my_first_table' already exists

  • Ran DROP TABLE IF EXISTS
    I ran: DROP TABLE IF EXISTS my_first_table;
    This seemed to succeed, but:

Other tables suddenly reappear in phpMyAdmin.

Their .ibd and .frm files are recreated in the datatest folder.

After deleting them in phpMyAdmin, they vanish — but return again after rerunning the import and then the DROP IF EXISTS.

  • Checked for table traces:

I searched the entire xamppreinstallation folder for old instances of the table names — found nothing relevant.

My Question:

  • First, why do the tables keep reappearing? Where are they being stored?
  • How can I completely and permanently delete these phantom tables from MySQL/phpMyAdmin so that I can successfully re-import my SQL dump without conflict?

Additional Info:

  • XAMPP version: 8.2.12
  • Engine: InnoDB
  • OS: Windows 11