Search Engine: Elastic

Article ID: 129741, created on Oct 29, 2016, last review on Oct 29, 2016

  • Applies to:
  • Operations Automation


Drop database task fails with the error:

Task name       Drop database db123456_dbname on host
Last execution output   MySQL API error: Error dropping database (can't rmdir './db123456_dbname', errno: 39).

At the same time it looks like database is already empty - attempt to drop it manually fails as well with the same error:

mysql> DROP DATABASE db123456_dbname;
ERROR 1010 (HY000): Error dropping database (can't rmdir './db123456_dbname', errno: 39)

mysql> use db123456_dbname;
Database changed

mysql> show tables;
Empty set (0.00 sec)


Database files were manually copied to the server, and folder /var/lib/mysql/db123456_dbname actually contains a database:

# du -hsx /var/lib/mysql/db123456_dbname
20M     /var/lib/mysql/db123456_dbname

of which MySQL is not aware of.


Backup database folder /var/lib/mysql/db123456_dbname, delete files from /var/lib/mysql/db123456_dbname and then restart the failed task.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF