Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-18-2007, 08:46 AM   #1
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
(my)sql: drop database doesn't remove database

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?
Old 09-19-2007, 09:09 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797

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

I posted a link in 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.

Last edited by Wim Sturkenboom; 09-19-2007 at 09:12 AM.
Old 09-19-2007, 10:59 AM   #3
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Original Poster
Rep: Reputation: 30
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.
Old 09-19-2007, 01:32 PM   #4
Registered: Sep 2005
Distribution: LFS
Posts: 60

Rep: Reputation: 22

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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Querying a database with a drop down menu php orfiyus Programming 5 12-10-2006 09:12 AM
TOMCAT and MS SQL database shane200_ Programming 0 05-31-2005 10:52 AM
database needed not sql herc222 Linux - Software 3 03-08-2004 07:34 AM
SQL question - are all database programs the same? BrianK Programming 2 02-24-2004 01:54 PM
SQL Database Administration GabeF Linux - Software 2 11-17-2002 07:28 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration