HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMinor

How do you remove reported non existing tables from mysql?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
tablesyounonremovemysqlreportedhowexistingfrom

Problem

I was trying to export a mysqldump --all-databases and noted errors. A subsequent

mysqlcheck --all-databases

revealed several non existent tables like the following

Error : Table 'stats.scoring_campaign_countries_99save' doesn't exist
status : Operation failed


Of course I can't drop a table if it does't exist so how to fix this?

The tables are using MyISAM.

Solution

If using MyISAM, you should be able to get rid of the tables by deleting the .frm files from the data folder while the database is down.

Remember to backup everything you can before doing anything like that!

Context

StackExchange Database Administrators Q#73708, answer score: 2

Revisions (0)

No revisions yet.