"DB Nightmare - MySQL Table Not Dropping After Alter"

iliela

Member
Joined
Mar 28, 2011
Messages
5
Reaction score
0
Title: DB Nightmare - MySQL Table Not Dropping After Alter

Just ran into a weird issue with MySQL. I've got a table I'm trying to drop after altering its name, but it's still showing up in my schema. Has anyone else had to deal with this?
 

slonotop4ik

Member
Joined
Nov 17, 2006
Messages
5
Reaction score
0
"Lol, try TRUNCATE instead of DROP if you're trying to nuke the table. MySQL gets stuck on tables with FKs and indexes, so truncate first, then drop. Works like a charm for me."
 

smarter

Member
NIGGA STYLE
Joined
Apr 30, 2009
Messages
674
Reaction score
236
"Hey guys, I've run into this issue before, usually it's because the table is being locked by another process or it's still referenced in a trigger/fk constraint. Try dropping the table with the `INPLACE` and `ALGORITHM` options, like this: `DROP TABLE table_name ALGORITHM=INPLACE INPLACE`."
 
Top