The error1010 (HY000) at line 1:error dropping database (can ' t rmdir './test/', errno:17) was encountered when deleting test databases in MySQL5.5.20
Mysql> select VERSION ();
+------------+
| VERSION () |
+------------+
| 5.5.20-log |
+------------+
1 row in Set
$./mysql_secure_installation
Remove test database and access to it? [y/n] Y
-Dropping test database ...
ERROR 1010 (HY000) at line 1:error dropping database (can ' t rmdir './test/', errno:17)
... failed! Not critical, keep moving ...
-Removing privileges on test database ...
... success!
Originally in the MySQL data/test have hidden files. empth, delete the hidden file manually and drop the test library.
$ls-la
Total 20
Drwxrwxr-x 2 mysql mysql 4096 2014-12-17 15:03:27.
drwxrwxr-x mysql mysql 4096 2015-01-13 01:12:13.
-rw-r--r--1 mysql mysql 0 2012-06-18 18:40:07. Empty
$rm-rf. Empty
mysql> drop database test;
Query OK, 0 rows Affected (0.00 sec)