[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how to shrink MySQL DB

Posted on 2008-06-11
6
Medium Priority
?
2,759 Views
Last Modified: 2008-09-18
I have a MySQL database running on Windows 2003.  It is rapidly occupying space on my server.  What is the best way to manage MySQL in order to purge data in order to reclaim space.  It should be noted that this MySQL is running InnoDB inside and therefore the standard 14 day purging of data does not reclaim any space since it puts all tables into one table space.  Thank you in advance
0
Comment
Question by:newtontech4
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
jojuez earned 1000 total points
ID: 21769271
You may need to truncate your BIN logs. Are you backing up this server?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 21769370
Can you identify what is exactly using the space?  Is it logs or is it the actual database/tablespace files?

If it is the actual tablespace files you should be able to reclaim space by doing reorgs regularly.
0
 

Author Comment

by:newtontech4
ID: 21769974
Hi giltjr - ibdata1 is growing the most.  I think this is due to the fact that InnoDB is being used.   This is a MySQL in my lab so i have not developed a back-up process yet.
0
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 1000 total points
ID: 21772535
O.K.  Do a reorg is your  best bet for reclaiming space.  This is assuming that data is being purged/deleted.  If no data is being purged/delete, only added, then there is nothing you can do.  It will continue to get bigger and bigger.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question