Though I thought that the import process had died, it was probably still running.
The DROP DATABASE
command probably waited for the database to finish importing before it ran.
So, rather than DROP DATABASE
taking a long time, it was probably just the import.
1.)
If anyone else reads this and is trying to cancel a database import and drop the database, I recommend you first find the PID (process id) for the import and run this from a different terminal:
$ kill [PID]
...where [PID] would be the actual PID for the process.
You should see the import halt immediately if the other terminal is still connected.
2.)
You could also run SHOW PROCESSLIST
in the phpMyAdmin SQL tab. The resulting table shows running processes, and clicking the 'x' next to the row you want to kill should do the trick. This would be the same effect as the accepted answer or killing the mysql
process from the mysql
command line.
Then run
DROP DATABASE `database_name`;
And everything should be clean.
Another answer suggested that killing the process within mysql is better than doing it from outside. I have not tested that answer, but it sounds very plausible. So I have marked it as the "accepted answer" instead of this one.