![]() ![]() Move the file(s) outside (or delete if not needed) and retry. now from another console I delete the "test" file, without closing this connection Mysql> SELECT version() INTO OUTFILE 'test' ĮRROR 1010 (HY000): Error dropping database (can't rmdir './pippo/', errno: 17) ![]() Server version: 5.6.12-log openSUSE package Reproducibility: Welcome to the MySQL monitor. In this case, the MySQL process creates them in its current working directory, which (tested on MySQL 5.6 on OpenSuSE 12.3) is the data directory of the database, e.g. INTO OUTFILE "filename" command where filename had no path. Such files could have been created by a SELECT. The directory contains some MySQL file that MySQL doesn't feel about deleting. The directory contains some hidden files MySQL knows nothing about. The fix to "Of late, the wife's keys fail to open the front door and she can't enter our home" is 'check the keys or have the lock repaired or replaced' the admittedly much quicker chown 777 is "Just leave the front door wide open! Easy peasy! What's the worst that might happen?") (needless to say, it's almost never the real fix to any Web or FTP problems either. And it's not a fix to "one weird trick to be able to drop my DB". Things get back to normal - it's not a permanent change, not even Local access), and will be immediately undone as soon as Inaccessible screwed MySQL installation (i.e. the above might sometimes be done, in exceedingly dire straits, by desperate and knowledgeable people, to gain access again to an otherwise.you allow literally everyone with any level of access whatsoever to the system to read and write your data, whether MySQL allows it or.if you do that to your SSH keys, goodbye SSHĬonnections etc.) since they realize they're now in a insecure context. you risk several security conscious programs to refuse to function anymore (e.g.By doing this (and chances are you won't be allowed to do Stuff, up to and including executing it as if it were a binary or shell Meaning, and 777 means " I hereby consent to everyone doing whatever they want with my Magic number that somehow MySQL programmers forgot to apply For those who don't already know, 777 (or 775, or 666) isn't a ( not Stack Overflow, thank goodness), the same "fix" I sometimesįind for Web and FTP problems - chown 777. I have happened upon an "easy fix" suggested on a "experts forum" If permissions and ownership match, and yet the above yields an access error, chances are that it's a security framework issue. To verify, check the system log for security violations, manually inspect apparmor/selinux configuration, and/or impersonate the mysql user and try going to the base var directory, then cd incrementally until you're in the target directory, and run something like touch aardvark & rm aardvark. So what you see is that the directory has correct permissions and ownership and yet it still gives Errno 13 because apparmor/selinux won't allow access to it. What happens is that AppArmor expects mysqld to have its data in /path/to/data/dir, and allows full R/W there, but MySQLd is from a different distribution or build, and it actually stores its data elsewhere (e.g.: /var/lib/mysql5/data/** as opposed to /var/lib/mysql/**). On Linux, this can also happen if you mix and match MySQL and AppArmor/SELinux packages. MySQL has no write permission on the parent directory in which the mydb folder resides.Ĭheck it with ls -la /path/to/data/dir/ # see below on how to discover data dir start MySQL server again and connect to it.remove the directory with the same name as the database.go to the datadir (this is where you should investigate see below).service mysql stop or rcmysqld stop or similar on Linux, NET STOP or through SERVICES.MSC on Windows) find the datadir with the command SHOW VARIABLES WHERE Variable_name LIKE '%datadir%'. ![]() If you just want to drop the database no matter what (but please first read the whole post: the error was given for a reason, and it might be important to know what the reason was!), you can:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |