I failed to drop a database:
mysql> drop database mydb; ERROR 1010 (HY000): Error dropping database (can\'t rmdir \'./mydb\', errno: 39)
Directory db/m
In my case it was due to 'lower_case_table_names' parameter.
The error number 39 thrown out when I tried to drop the databases which consists upper case table names with lower_case_table_names parameter is enabled.
This is fixed by reverting back the lower case parameter changes to the previous state.