引用Stackoverflow上大神的一段话:
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.
原因就是路径下有非数据库文件,删除即可。
参考:http://stackoverflow.com/questions/4584458/error-dropping-database-cant-rmdir-test-errno-17