LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   (my)sql: drop database doesn't remove database (https://www.linuxquestions.org/questions/programming-9/my-sql-drop-database-doesnt-remove-database-585542/)

kpachopoulos 09-18-2007 08:46 AM

(my)sql: drop database doesn't remove database
 
Hi,
i am working on a DB. I drop it and rebuild/repopulate it quite often. However, i have noticed, that when dropped, no space is freed from the HD.
What's the problem?

Wim Sturkenboom 09-19-2007 09:09 AM

How do you know that? Output of df or du? Or do you still see the files?

I posted a link in http://www.linuxquestions.org/questi...d.php?t=555519 that explains why there might be differences between du and df. Might apply to your sitation as well.

PS not really a programming question inmy opinion.

kpachopoulos 09-19-2007 10:59 AM

I posted in this subforum by mistake; it is because i usually post my mysql questions here.

As far as my problem is concerned, i am using "df". In this case, "du -ca /" gives me ~40GB used and and "df" ~80GB.

mjones490 09-19-2007 01:32 PM

From http://dev.mysql.com/doc/refman/4.1/...-database.html:

Quote:

If other files or directories remain in the database directory after MySQL removes those just listed, the database directory cannot be removed. In this case, you must remove any remaining files or directories manually and issue the DROP DATABASE statement again.
My guess is that mysqld user does not have permission to delete the database files.


All times are GMT -5. The time now is 12:06 PM.