Solved

how to shrink MySQL DB

Posted on 2008-06-11
6
2,747 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
6 Comments
 
LVL 4

Accepted Solution

by:
jojuez earned 250 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 250 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lightweight Networking 9 61
Currency in SQL? 2 30
Use Select Query to Return Results as a Form 9 23
Formating field inside mysql query 2 13
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

809 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