Search code examples
mysqlphpmyadminxampp

#1010 - Error dropping database (can't rmdir './my_ucf_database', errno: 39 "Directory not empty") What do I do to drop this database?


I am relatively new to phpmyadmin and I have been using xampp for class. I am running Ubuntu 20.04 and all I want to do is drop a database but it will not let me and it shows the error

#1010 - Error dropping database (can't rmdir './my_ucf_database', errno: 39 "Directory not empty")

I have searched the web for the answer and I cannot find it anywhere, will someone please help me solve this annoying problem. I just wanna delete this database, whats even stranger is that it is completely empty whenever I look at it. I cannot find the file on my Ubuntu laptop and I am at my wits end. Please help me.


Solution

  • The question is not relative to PHPMyAdmin.

    The database in MySQL is a directory registered in system database which will contain all files relative to this database. All these files will be created by MySQL, and all of them will be registered too. MySQL supposed that none other files will be placed into this directory.

    When you send a command to drop the database MySQL removes all files which are registered then removes the directory itself. If any problem during this process performing occures (some file or the directory itself cannot be removed due to any reason) the command fails with according error (provided by OS filesystem).

    You must remove excess files placed into the database directory before dropping the database. MySQL itself will remove them never. If MySQL reports about some problem then you must eliminate the problem (remove excess file, fix incorrect attributes/access rights/etc.) in the filesystem then repeat DB dropping attempt.