Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

Easy fix for ERROR 1010 (HY000): Error dropping database

22 June,2020 by Rambler

Question : I'm trying to drop a database in MariaDB with the following command : DROP DATABASE mydatabase, but getting an error message :

ERROR 1010 (HY000): Error dropping database (can't rmdir './mydatabase', errno: 39 "Directory not empty")

What is stopping the database from being dropped?

 

Answer:  MariaDB represents a database in the data directory. When you're executing the DROP DATABASE command - you're making a request to delete the table files - followed by removal of the directory.   

The DROP DATABASE command - does not drop non table file - therefore it cannot progress to the remove directory step.

That's the error message you see i.e unable to remove directory ERROR 1010 (HY000): Error dropping database (can't rmdir './mydatabase', errno: 39 "Directory not empty")

To fix this issue : Remove the non-table files and then attempt the DROP DATABASE command

 

Read more on MariaDB backup & restore 

How to do a MariaDB Restore

How to move a MariaDB table to another database;

How to fix Table doesn't exist in engine error for MariaDB Error 1932


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Easy fix for ERROR 1010 (HY000): Error dropping database


dba-ninja.com