mysql can't rmdir linux,Can't rmdir './mydatabase', Errno: 39

本文介绍了一种常见的MySQL错误——当尝试删除包含未被MySQL管理文件的数据库时出现的错误1010,并提供了解决方案。通过删除问题文件并重新运行删除数据库命令可以解决此问题。

Issue

Mysql drop table command returns:

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

Likely Cause

There is a file in the database folder which isn't being managed by Mysql. This file could be hidden detritus or, more likely, an orphaned .ibd file.

# cd /var/log/mysql/mydatabase

# ls -la

total 72

drwx------ 2 mysql mysql 4096 Jun 23 19:57 ./

drwx------ 7 mysql mysql 4096 Jun 23 21:08 ../

-rw-rw---- 1 mysql mysql 65536 Jun 23 19:56 actions.ibd

Something Like a Solution

I just delete the problem file and run the database drop command again.

# rm -f actions.iddmysql> drop database mydatabase;

Query OK, 0 rows affected (0.00 sec)

References

include ../make/makefile.inc MAKE = make RMDIR = rm -Rf RM = rm -f LIBRARY := $(shell find .. -maxdepth 1 -type d -name "Lib*") DS_MODS := $(shell find .. -maxdepth 1 -type d -name "DS*") MODULES := $(shell find .. -maxdepth 1 -type d -name "Mod*") MODULES += $(shell find .. -maxdepth 1 -type d -name "SP*") ALL_MODS = $(LIBRARY) $(DS_MODS) $(MODULES) CL_MODS := $(addprefix _clean_,$(ALL_MODS)) RM_MODS := $(addprefix _rm_,$(ALL_MODS)) .PHONY: all $(ALL_MODS) clean erase builddir copylibs all: copylibs $(ALL_MODS) @$(COPY) $(DSPATH)/exe/dshost.out ./dsp @$(COPY) $(DSPATH)/libs/Proto*.so . @$(COPY) $(DSPATH)/libs/Mod*.so ../components clean: $(CL_MODS) install: $(RM_MODS) @$(RMDIR) ../Debug @$(RMDIR) ../Release @$(RMDIR) ../build @$(RMDIR) ../libs @$(RMDIR) ../make @$(RMDIR) ../ModuleSource @$(RM) ../*.* @$(RM) ./*.a @echo all source codes erased. $(ALL_MODS): @$(MAKE) -C $@ --no-print-directory $(CL_MODS): @$(MAKE) -C $(patsubst _clean_%,%,$@) --no-print-directory clean $(RM_MODS): @$(RMDIR) $(patsubst _rm_%,%,$@) builddir: @$(MKDIR) ../build @$(MKDIR) ../libs ../libs/libDS.a: $(DSPATH)/libs/libDS.a @echo Update $(@F) @$(COPY) $^ $(@D) ../libs/libDSTL.a: $(DSPATH)/libs/libDSTL.a @echo Update $(@F) @$(COPY) $^ $(@D) ../libs/libMath.a: $(DSPATH)/libs/libMath.a @echo Update $(@F) @$(COPY) $^ $(@D) ../libs/libLua.so: $(DSPATH)/libs/libLua.so @echo Update $(@F) @$(COPY) $^ $(@D) @$(COPY) $^ ../exe/ copylibs: builddir ../libs/libDS.a ../libs/libDSTL.a ../libs/libMath.a ../libs/libLua.so 分析printf不打印
最新发布
11-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值