Sid Sid - 6 months ago 28
SQL Question

Error Dropping Database (Can't rmdir '.test\', errno: 17)

you have been of terrific help today. I am on my way to learn PHP with MySQL and unexpectedly got stuck while dropping the database.

Basically, I was taught on how to create a root password using the "mysqladmin -u root -p password" command, this was done all through the windows command editor. Now, the next process was to display the default databases (info. schema, mysql and test) which was achieved by using "SHOW DATABASES;"

But according to the book, we had to delete the redundant test file and the following error pops up:


Error Dropping Database (Can't rmdir '.test\', errno: 17)


The command put to use was
DROP DATABASE test;


I am using MYSQL and PHPMYADMIN. Any help on how to drop the file with no errors?

Answer

A database is represented by a directory under the data directory, and the directory is intended for storage of table data.

The DROP DATABASE statement will remove all table files and then remove the directory that represented the database. It will not, however, remove non-table files, whereby making it not possible to remove the directory.

MySQL displays an error message when it cannot remove the directory

you can really drop the database manually by removing any remaining files in the database directory and then the directory itself.

Comments