Error in dropping a database in MySQL (can't rmdir '.\\oro', errno: 41)

こ雲淡風輕ζ 提交于 2019-11-28 23:01:25

In my case, I solved the problem by navigating to the folder:

C:\wamp\bin\mysql\mysql5.6.12\data

and remove the database folder which I was trying to drop. That's it.

Himanil Gupta

The ERROR 1010 you got is occurred When you create a database, a file is created for you. This implies "create database foo" will create a directory foo in your data directory. All table definitions/data for foo are in the foo directory. All these tables are created in the server and their corresponding files are created by the server. If, for some reason, a file is created in or placed in this directory that is not generated by MySQL, the error 1010 will be issued by the server when you drop foo.

and in case when you are trying to drop database using phpmyadmin refer this phpmyadmin enable drop database statement.

Hope this may help you to understand the error.

Mysql generate two file for any table

  1. .frm
  2. .ibd

check in your directory for both file must exist, if any one is missing then remove the remaining one or if you wish you can remove all the file, but be careful this my delete all your data from tables.

This works for me, I hope it also works for you too.

try changing the value in config file of phpmyadmin,

$cfg['AllowUserDropDatabase']   = TRUE;

I realize I'm really late to the party, but when I had this issue (and ended up here) I navigated to the directory and actually found a file had inadvertently been created in the directory via INTO OUTFILE without a path, and I'd forgotten about it. MySQL seemed to have an issue because it had not created the file, and so could not delete the directory in question.

Edeeson Opina

If you're using XAMPP just go to C:/xampp/mysql/data/YourDBFolder

After deleting that folder everything should be okay.

  1. Go to

    C:\wampXY\bin\mysql\mysqlx.y.z\data

(XY.. refer versions)

  1. Rename the file you want to delete to anything else.(optional only for special cases)

  2. Now simply delete the renamed file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!