how to drop database

Viewed 54303

i used the following sytanx

drop database filmo; 

and got the following error:

ERROR 1010 (HY000): Error dropping database (can't rmdir './filmo/', errno: 17)

any ideas..

13 Answers

It means there are files in that directory not relating to MySQL. Another issue, although I doubt it, is insufficient permissions. You may delete that directory from the filesystem.

This is amazingly old, but another thing to check is the data folder. On Windows, that should be C:\ProgramData\MySQL<Version>\Data. IN my case, I was getting a 'cannot find folder' error.

I found that somehow the data folder for my database had been deleted. I imagine it was user error. I added a blank folder with the database name, and when I went back the DROP the table, it went as expected. Took me a while to find out what had happened, but hopefully this will save someone else the heartache.

do you have write permission on that directory (and the parent)? you may need to recursively make the directory writable (security tab in windows or chmod in nix) and delete any non-db files like "Thumbs.db"

Related