Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
789 views
Welcome To Ask or Share your Answers For Others

1 Answer

A database is represented by a directory under the data directory (usually /var/lib/mysql), 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...