Error Dropping Database Errno 17

Last modified: 
Wednesday, July 15th, 2015

Error

Error dropping database (can't rmdir './db1/', errno: 17)

I got this error on Plesk. This tip from someone at Stack Overflow notes that DROP DATABASE first removes table files then runs rmdir on the folder containing them. It won't delete any other kinds of files, so if there's something odd in there, it won't be flushed and rmdir will fail. In my case, there was .csv file in /var/lib/mysql/db1 . Once this file was removed the database could be deleted using the Plesk interface.

See also, Can't rmdir './mydatabase', Errno: 39.


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.