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

后端 未结 17 2271
误落风尘
误落风尘 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:43

    Just to add to the responses so far: In Windows 10, the data files are kept here...

    C:\ProgramData\MySQL\MySQL Server [m.n]\data

    There will be directories for each schema in your database. You will want to go inside the schema you are trying to drop, manually delete any superfluous files then try the drop command again.

    Any workbench changes against a database will get stored in this location. For example, I had this error following a reverse engineering exercise on one of my databases and saving the changes which get stored in a .mwb file in this location.

    0 讨论(0)
  • 2020-11-28 22:43

    just go to data directory in my case path is "wamp\bin\mysql\mysql5.6.17\data" here you will see all databases folder just delete this your database folder the db will automatically drooped :)

    0 讨论(0)
  • 2020-11-28 22:45

    If it is XAMPP, Do the following:

    cd /opt/lampp/var/mysql;
    sudo su;
    rm -rf test;
    

    Hope this helps.

    0 讨论(0)
  • 2020-11-28 22:49

    Go to the datadir for your mysql installation and rm the databases manually. It can be

    /usr/local/var/mysql
    

    Then,

    rm -R <Your DB name>
    

    To check datadir for your installation,

    vim the mysql.server file and find it there.
    
    0 讨论(0)
  • 2020-11-28 22:51

    I ran into this problem, and when I checked out the database directory, there were a number of exp files (the ibd and frm files had been removed). Listing the files to look at their attributes (since the owner already had rw privileges on the files)

    lsattr *.exp
    -------------e-- foo.exp
    -------------e-- bar.exp
    

    Man page says

           The  'e'  attribute  indicates that the file is using extents for mapping the blocks on disk.
           It may not be removed using chattr(1).
    

    You actually can chattr -e these files, but mysql still won't let you drop the database. Removing the files with rm, however, allows the database to be dropped cleanly.

    0 讨论(0)
提交回复
热议问题