patternsqlMinor
View dropped, now shows as table "in use", can't drop
Viewed 0 times
candroppedviewnowdropshowsusetable
Problem
I have a view on a MySQL/MyISAM setup, then the underlying table had a column dropped, and made that view invalid.
I tried dropping the view so I could recreate it, then MySQL said it was a table (not a view) and marked it "in use".
Now I can't drop nor repair that table because it says it is not a table.
I've googled for hours trying find a way to fix this :(
I do have root access on the MySQL server running Ubuntu. I stopped MySQL and tried
I can see a
Do I need to delete that file to make the corrupt item go away,
or do I somehow delete the table from the db schema?
I have a db backup from last night, but would rather fix this 1 issue than restore from backup and lose today's changes.
I tried dropping the view so I could recreate it, then MySQL said it was a table (not a view) and marked it "in use".
Now I can't drop nor repair that table because it says it is not a table.
I've googled for hours trying find a way to fix this :(
I do have root access on the MySQL server running Ubuntu. I stopped MySQL and tried
myisamchk, but no luck.I can see a
.frm file for the view in the db data folder.Do I need to delete that file to make the corrupt item go away,
or do I somehow delete the table from the db schema?
I have a db backup from last night, but would rather fix this 1 issue than restore from backup and lose today's changes.
Solution
You should be able to simply rename that file to just about anything that doesn't end in .frm and then
SHOW TABLES. It should be gone. If it's still there, FLUSH TABLES, then SHOW TABLES again.Context
StackExchange Database Administrators Q#35633, answer score: 3
Revisions (0)
No revisions yet.