1

This is quite odd, it's happening only for a some Databases, but I get this error:

ERROR 1010: Error dropping database (can't rmdir './main', errno: 66)
SQL Statement:
drop database `Main`

This happens over and over, even on Root user...

This happens even if there is nothing in the database.

2 Answers2

0
mysql> drop database DB_NAME; 
ERROR 1010 (HY000): Error dropping database 
(can't rmdir './DB_NAME', errno: 66)

1) mysql -e "select @@datadir" -> /usr/local/mysql/bin/mysql

2) Go to DB folder: cd /usr/local/mysql/data/

3) Delete DB folder of DB with issue (in this case: "DB_NAME")

Source stack overflow

Community
  • 1
  • 1
Nagaraj S
  • 13,316
  • 6
  • 32
  • 53
  • You literally copied that, and I said it didn't work in the questions comments. –  Jan 02 '14 at 06:41
0

I figured out, and it wasn't all that hard, using the OS X terminal I entered this in:

open /usr/local/mysql/data/

then, I just deleted the folders. An admin password was required though.

Thanks to anyone that offered to help

  • I got this `The file /usr/local/mysql/data does not exist.` when running your command. – code-8 Oct 21 '15 at 13:08
  • @ihue This was posted like 1.75 years ago. I don't use Mac OS anymore and MySQL could have updated and changed by then. Try looking at the posts linked in the comments of the question, or try the answer below. –  Oct 21 '15 at 14:20