Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql and large files.... harddrive full!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Rukie
l33t
l33t


Joined: 26 Jan 2004
Posts: 692
Location: SE Wi, Home of cheese and cowtippers.......

PostPosted: Thu Jan 25, 2007 3:58 pm    Post subject: mysql and large files.... harddrive full! Reply with quote

Alright, I wanted to install wikipedia on my laptop. After numerous attempts and deleting of the tables and starting over again, my harddrive has become increassingly full with the same crap, again and again and again.

My harddrive is like 99.999999 percent full after I deleted one or two tiny little files...

So I ask you know, how do I delete these previous mysql databases that... haven't really been deleted when I used "delete from page;"

Thanks for a nyhelp.
_________________
Gentoomania! Support the Open Source!
http://www.rukie.ath.cx
Back to top
View user's profile Send private message
martin20450
Tux's lil' helper
Tux's lil' helper


Joined: 30 Sep 2005
Posts: 91

PostPosted: Thu Jan 25, 2007 4:22 pm    Post subject: Reply with quote

You can use mysqldump to dump any legitimate tables you have going on, then simply remove /var/lib/mysql/*
Back to top
View user's profile Send private message
Rukie
l33t
l33t


Joined: 26 Jan 2004
Posts: 692
Location: SE Wi, Home of cheese and cowtippers.......

PostPosted: Thu Jan 25, 2007 4:24 pm    Post subject: Reply with quote

alright, what will mysqldump actually do? save the tables or w hat?
_________________
Gentoomania! Support the Open Source!
http://www.rukie.ath.cx
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4735
Location: Angra do Heroísmo (PT)

PostPosted: Thu Jan 25, 2007 4:26 pm    Post subject: Reply with quote

Hi Rukie.

Have you run drop database <db>? You might want to take a look at http://dev.mysql.com/doc/refman/5.0/en/drop-database.html
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh


Last edited by jmbsvicetto on Thu Jan 25, 2007 4:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
martin20450
Tux's lil' helper
Tux's lil' helper


Joined: 30 Sep 2005
Posts: 91

PostPosted: Thu Jan 25, 2007 4:28 pm    Post subject: Reply with quote

If you don't have any databases that you need to save then don't worry about the mysqldump, it can be used to save the databases you want, eg mysqldump wantedTable > wantedTable.sql.
So if this is purely for your wikipedia then rm /var/log/mysql/* -rf && emerge --config mysql (Not sure on that one but think that's right).
Back to top
View user's profile Send private message
Rukie
l33t
l33t


Joined: 26 Jan 2004
Posts: 692
Location: SE Wi, Home of cheese and cowtippers.......

PostPosted: Thu Jan 25, 2007 4:46 pm    Post subject: Reply with quote

from 100% full to 29% full, thanks :-D Now I just ogtta reinstall mediawiki and I'm set.
_________________
Gentoomania! Support the Open Source!
http://www.rukie.ath.cx
Back to top
View user's profile Send private message
Mad Merlin
Veteran
Veteran


Joined: 09 May 2005
Posts: 1155

PostPosted: Thu Jan 25, 2007 8:13 pm    Post subject: Reply with quote

You probably had lots of binary logs left over. The binary log is a record of every SQL statement that could have possibly changed a table. The easier way to clear them out is to issue a

Code:

reset master;


to mysql.
_________________
Game! - Where the stick is mightier than the sword!
Back to top
View user's profile Send private message
Rukie
l33t
l33t


Joined: 26 Jan 2004
Posts: 692
Location: SE Wi, Home of cheese and cowtippers.......

PostPosted: Thu Jan 25, 2007 11:26 pm    Post subject: Reply with quote

shucks, too late ;) thanks for future reference tho.
_________________
Gentoomania! Support the Open Source!
http://www.rukie.ath.cx
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Fri Jan 26, 2007 11:15 am    Post subject: Reply with quote

Mad Merlin wrote:
You probably had lots of binary logs left over.


Or you could just comment out 'log-bin' from your /etc/mysql/my.cnf after you remove the binary logs.
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Fri Jan 26, 2007 6:50 pm    Post subject: Reply with quote

pteppic wrote:
Mad Merlin wrote:
You probably had lots of binary logs left over.


Or you could just comment out 'log-bin' from your /etc/mysql/my.cnf after you remove the binary logs.


Or if you want to have a small backlog just in case, you might want to run something like this in cron:

Code:
PURGE MASTER LOGS BEFORE NOW() - INTERVAL 20 HOUR;

_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum