LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-20-2009, 04:29 PM   #1
jnojr
Member
 
Registered: Sep 2007
Location: San Diego, CA
Posts: 175

Rep: Reputation: 15
MySQL ibdata1 growing and growing and growing and...


RHEL5, mysql-5.0.45-7.el5, and I know jack about MySQL.

/var/lib/mysql/ibdata1 just keeps growing bigger and bigger. I believe it may be logging each transaction. I really need to stop this... it's on a VM with limited disk space, and I really don't care if transactions cannot be recovered.

1) How do I shrink the file? Right now, my best guess is to dump the databases, stop mysqld, delete /var/lib/mysql/ibdata1, start mysqld, hope it works, and restore the databases. Yes/no?

2) How do I tell mysqld to not keep collecting gigabytes of information? If there's an easy way to have it keep the last X days worth, great. If not, how do I tell it to not do any logging at all, if that's what it's doing?
 
Old 07-20-2009, 07:11 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
You need to read this part of the manual: http://dev.mysql.com/doc/refman/5.0/...iguration.html and maybe look at Per-Table Tablespaces http://dev.mysql.com/doc/refman/5.0/...blespaces.html


However, the key thing in the first link is:
Quote:
Two important disk-based resources managed by the InnoDB storage engine are its tablespace data files and its log files. If you specify no InnoDB configuration options, MySQL creates an auto-extending 10MB data file named ibdata1 and two 5MB log files named ib_logfile0 and ib_logfile1 in the MySQL data directory. To get good performance, you should explicitly provide InnoDB parameters as discussed in the following examples. Naturally, you should edit the settings to suit your hardware and requirements.
IOW, if its ibdata1 that's growing, that's real data, not logging... you need to investigate where all the rows are coming from.
 
  


Reply


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
X utilaziion is growing and growing amirb Linux - Desktop 2 05-28-2007 03:55 AM
Snort database growing large; how to use mysql to delete? logicalfuzz Linux - Software 1 01-12-2006 06:14 PM
My files are growing!!!! Kanon Linux - Newbie 7 11-13-2004 07:26 PM
Growing MySQL footprint robbiemorgan Linux - Newbie 3 09-22-2004 08:37 AM
Growing Up... bkeating General 10 06-17-2002 05:47 AM


All times are GMT -5. The time now is 05:24 PM.

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