Error Dropping Database (Can't rmdir '.test\', errno: 17)

后端 未结 17 2354
误落风尘
误落风尘 2020-11-28 22:09

Basically, I was taught on how to create a root password using the \"mysqladmin -u root -p password\" command, this was done all through the windows command editor. Now, the

17条回答
  •  天命终不由人
    2020-11-28 22:24

    I ran into this same issue on a new install of mysql 5.5 on a mac. I tried to drop the test schema and got an errno 17 message. errno 17 is the error returned by some posix os functions indicating that a file exists where it should not. In the data directory, I found a strange file ".empty":

    sh-3.2# ls -la data/test
    total 0
    drwxr-xr-x   3 _mysql  wheel  102 Apr 15 12:36 .
    drwxr-xr-x  11 _mysql  wheel  374 Apr 15 12:28 ..
    -rw-r--r--   1 _mysql  wheel    0 Mar 31 10:19 .empty
    

    Once I rm'd the .empty file, the drop database command succeeded.

    I don't know where the .empty file came from; as noted, this was a new mysql install. Perhaps something went wrong in the install process.

提交回复
热议问题