MySQL: ERROR 1010 (HY000): Error dropping database (can't rmdir './sampledb', errno: 39)
Error:
mysql> drop database sampledb;ERROR 1010 (HY000): Error dropping database (can't rmdir './sampledb', errno: 39)
Solution:
Open new terminal# cd /var/lib/mysql
var/lib/mysql# ls
sampledb
/var/lib/mysql# rm -fr sampledb
Open MySQL
mysql> drop database sampledb;
ERROR 1008 (HY000): Can't drop database 'foodb'; database doesn't exist
mysql> create database sampledb;
Query OK, 1 row affected (0.00 sec)
mysql> drop database sampledb;
Query OK, 0 rows affected (3.38 sec)